At 15:03 22.02.2003, Chris Hayes said:
--------------------[snip]--------------------
>Since PHP 4.1 form data are not automatically available as variables in the 
>followup file.
>
>http://nl.php.net/release_4_1_0.php explains it all, for now it's enough
>to say
>- either turn register_globals on in php.ini (google knows how)
>  - or read $_POST['gender'], e.g.
>$gender=$_POST['gender'];
--------------------[snip]-------------------- 

if "gender" is left empty when submitting the form this will still trigger
a different warning (unknown index, or something like that).

if (array_key_exists('gender', $_POST))
    $gender = $_POST['gender'];
else $gender = null;

Being paranoid you might even check if $_POST is available:
   if (is_array($_POST))


-- 
   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035
    ^     http://www.vogelsinger.at/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to