Reply to Re: isset error ?

Your name:

Reply:


Posted by Norman Peelman on 12/06/06 21:16

"Gaga" <rg2006@hotmail.com> wrote in message
news:el6h58$8mh$1@ss408.t-com.hr...
> I still have problems with :
>
> if(isset($_REQUEST['name']) && isset($_REQUEST['lastname']))
> {
> echo " $name ";
> echo " $lastname";
> }
> else
> {
> echo ' Error ';
> }
>
> After i have changed to REQUEST i get wright part but there is no
checking.
> If you leave the name texbox blank you will end up in the first part...
the
> same if you enter both fields. ?
>
>
>

Change to:

if(isset($_REQUEST['name']) && isset($_REQUEST['lastname']))
{
echo "$_REQUEST[name]<br>";
echo "$_REQUEST[lastname]<br>";
}
else
{
echo ' Error<br>';
}

or

if(isset($_REQUEST['name']) && isset($_REQUEST['lastname']))
{
echo $_REQUEST['name'].'<br>';
echo $_REQUEST['lastname'].'<br>';
}
else
{
echo 'Error<br>';
}

or

if(isset($_REQUEST['name']) && isset($_REQUEST['lastname']))
{
echo "{$_REQUEST['name']}<br>";
echo "{$_REQUEST['lastname']}<br>";
}
else
{
echo 'Error<br>';
}

....all will output the same...

Norm
--
FREE Avatar hosting at www.easyavatar.com

[Back to original 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

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