help with session

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, this is my first post to this newsgroup. Does this code look ok or is there a more clean way of doing this? I am learning. Thank you for reading.
Jason

   if ( !empty($_REQUEST['gender']) )
          {
            $registrationGender=$_REQUEST['gender'];
          }
          else {
                 if (session_is_registered('registrationGender'))
                  {
                   $registrationGender=$_SESSION['registrationGender'];
                   print "you are preregistered as a $registrationGender";
                  }
                  else
                  {
                   print "your gender is unknown, youare assumed to be a male";
                   $registrationGender="male";
                  }
               }

        $_SESSION['registrationGender']=$registrationGender;

_________________________________________________________________
100’s of Music vouchers to be won with MSN Music
https://www.musicmashup.co.uk/index.html
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux