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