To protect yourself by keeping register_globals off but still have access to
your GET and POST info, do the following:
<snip>
foreach($_POST as $key=>$value) {
$$key = $value;
}
// Now all the post vars are in their corresponding key names
// You can do the same with $_GET vars
</snip>
Using the $$key assigns whatever $key is to a variable with that value, e.g.
$key = "sid";
$value = "W1111";
So:
$$key = $value;
will make the following true:
$sid == "W1111";
It's a pretty good way of re-doing pages that were written with
register_globals=on to run with register_globals=off
Gary Every
Sr. UNIX Administrator
Ingram Entertainment
(615) 287-4876
"Pay It Forward"
mailto:[EMAIL PROTECTED]
http://accessingram.com
> -----Original Message-----
> From: Thorsten K�rner [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 19, 2003 2:05 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Problems with formvalues by using Suse 8.2
>
>
> Hi
> Am Donnerstag, 19. Juni 2003 20:07 schrieb Ruprecht Helms:
> > Hi,
> >
> > under using Suse 8.2 I've the problem that the values of
> formfields will be
> > put out or worked withit within a phpscript.
> >
> > The testscript with phpinfo() is working fine.
> >
> > What have I to set (in the php.ini) that php is handling the
> > formfieldvalues properly?
> Seems to be a little bit OT here.
> Your question is not very precise, but I'll give it a try.
> Depending on your form-method, you can request the values by
> accessing either
> $_GET['formfieldname'] or $_POST['formfieldname'] where
> formfieldname has to
> be replaced by the real names of the fields.
> Hope that's it.
>
> CU
>
> Thorsten
> --
> Thorsten K�rner http://www.123tkShop.org
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>