Page 1 of 1

Problem passing vars

Posted: Fri Jan 12, 2007 5:04 am
by Formula
Hi,

I do hope it is the right room to ask...
I had to move one of my sites to a new server.
On the new server I can't pass variables using post or get methods.

I am using this method to get the vars:
while (list($name, $value) = each($POST)) {
${$name} = $value;
}

it doesn't working anymore.

Should I need to change something on the php.ini?

Thanks,
Assaf

Posted: Fri Jan 12, 2007 5:15 am
by Kieran Huggins
underscore

Posted: Fri Jan 12, 2007 5:24 am
by Formula
sorry I am using _$POST and it doens't work...

Posted: Fri Jan 12, 2007 5:33 am
by Kieran Huggins
Nope - it sure wouldn't!

Posted: Fri Jan 12, 2007 5:35 am
by Formula
why?

Posted: Fri Jan 12, 2007 5:46 am
by Kieran Huggins

Posted: Fri Jan 12, 2007 5:50 am
by Ollie Saunders
What you are trying to do is a bad idea for security reasons, it means it is possible for POST to overwrite previously declared values. So if you are going to do this do it before you declare any variables in your script and use the proper function for doing such things: extract().