You are here: Re: Simple If Statement « PHP Programming Language « IT news, forums, messages
Re: Simple If Statement

Posted by Marcin Dobrucki on 01/02/07 14:06

print_r($_GET);

See if 'functionType' is set, and one of those values. You could
also do:

if ( isset($_GET['functionType']) ) {
$type = $_GET['functionType'];
// the rest of the if stuff
}
else {
die ("Error, functionType is not in GET");
}


/m

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;
> }
>
> Thanks
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация