Posted by william on 01/02/07 16:12
On Tue, 02 Jan 2007 05:47:20 -0800, Jeff Vaccaro wrote:
> How come this doesn't work?
>
> What am I doing wrong?
>
> $type = $_GET['functionType'];
>
> if ($type == 'Add'){
> $AddSQL = "INSERT INTO...";
> echo $AddSQL;
> }elseif ($type == 'Update'){
> $UpdateSQL = "Update ...";
> echo $UpdateSQL;
> }elseif ($type == 'Delete'){
> $DelSQL = "DELETE FROM ...";
> echo $DelSQL;
> }
you should make your code more readable (for yourself)
have a look on switch/case/break.
[Back to original message]
|