Some of the reason to have "register_global" on is to easly use variables
sent by post, get, cookie method of a form.
Ex.
<form name="form1" method="post" action="anypage.php?get_var=1">
<input type="text" name="text_post" value="Hello World">
<input type="submit" name="Submit" value="Submit">
</form>
in your code at the page "anypage.php" you will have available the
variables:
$get_var==1 and $text_post=="Hello World"
if "register_global=TRUE " in php.ini file
- in this case u still have available $_POST;GET ecc...
$_GET['get_var']==1 and $_POST['text_post']=="Hello World"
if "register_global=FALSE " in php.ini file
- in this case you don't have the $get_var e $text_post
available, so code is safer
I would suggest to leave register global=FALSE as to have safer code unless
u have to rewrite the whole code. Think about having hacked variables value
send by GET, COOKIE method.
Bye
"Hans Lellelid" <[EMAIL PROTECTED]> ha scritto nel messaggio
news:[EMAIL PROTECTED]
> Hi Andrew,
>
> Andrew Rothwell wrote:
> > Thank you everybody that responded so quickly -
> > I used the suggestion of Franciccio - and the data is now gow into the
db
> > Thank you very much - I really appreciate the help.
> >
> > Another question - with this fix in place - do I still need the
> > register_globals = On ?
> > Or can I now turn it off?
> >
>
> It seems like you should have kept your old php.ini file, as this other
> error you encountered was probably due to your old php.ini file having
> this setting:
>
> magic_quotes_gpc = 1
>
> That INI var instructs PHP to automatically addslashes() to any
> GET/POST/COOKIE data. I would suggest turning this back on, unless
> you've thoroughly redesigned your code to not need it.
>
> This is unrelated to register_globals, which you will need to leave on
> unless you redesign your application.
>
> Hans
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php