On Sunday 17 November 2002 00:36, Chris Jackson wrote: > I am havein troubles gettin my form variables to work. > The "register_globals" in php.ini is set to its default of "off".
[snip] > the <?php echo $PHP_SELF ?> dosent print anything in the action of the > form and the Because register globals is disabled you have to use $_SERVER['PHP_SELF'], that's covered in the manual. > echo $_POST["answered"]; on the first run gives an error that says that > "answered" is > an undefined variable. That's because the first time you run it you have not submitted a form yet so it's undefined. Various ways to get around this, most straight forward (IMO) being: if (isset($_post['answered'])) { echo $_post['answered']; } -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* This is a test of the emergency broadcast system. Had there been an actual emergency, then you would no longer be here. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php