register_globals off issues
| From: | Mark Spohr | Date: | Tue, 12 Nov 2002 20:05:48 +0000 |
| Subject: | register_globals off issues | ||
| Groups: | php.general php.lang | ||
| Request: | Send a blank email to php-general+get-124056@lists.php.net to get a copy of this message | ||
I'm very new to PHP/mySQL and am working through the "PHP and mySQL for Dummies" examples. Unfortunately, these were all written with register_globals on and the system I'm using has register_globals off.
I'm having trouble converting the examples to use the $_POST() expression.
Specifically, the examples use a POST with a form variable to run a query and then unset this variable as such:
if (@$form == "yes")
{
unset($form);
}
I'm trying to convert this to use $_POST() as such:
if (@$_POST['form'] == "yes")
{
unset($_POST['form']);
}
However, this does not work. It appears that you can't unset the $_POST['form'] array element.
Does anyone have any suggestions on how to fix this?
I know I'm probably missing a few very obvious things here... but I am a newbie.
/Mark
--
Mark H. Spohr
email: mspohr@nnk.com