Reply to Re: isset error ?

Your name:

Reply:


Posted by Michael Fesser on 12/06/06 18:48

..oO(Gaga)

>I still have problems with :
>
>if(isset($_REQUEST['name']) && isset($_REQUEST['lastname']))
>{
> echo " $name ";
> echo " $lastname";
> }

This won't work on recent systems. To access form values or URL
parameters you _always_ have to use the $_GET or $_POST array:

echo $_POST['name'], ' ', $_POST['lastname'];

>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...

That's because empty input fields are submitted (an empty string is a
valid value), so $_POST['name'] exists.

> the
>same if you enter both fields. ?

if (!empty($_POST['name']) && !empty($_POST['lastname'])) {
...
}

Micha

[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

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