Development #php#programming 1 min

the problem with PHP v.4.2 and the POST method

Translation of the original in Catalan. Read it in: CatalàCastellano

well, since uri already told me that php 4.2 does not accept global variables, for all those who passed the variables by the get or post method it no longer reads them because it no longer allows them to be used

That's why Uri did a script to solve this:

For the POST method:

<br /?

reset($HTTP_POST_VARS);

while(list(clave,clave,val)=each($HTTP_POST_VARS)){

$$clave=$val;

}

?>

and for the GET method:

<br /?

reset($HTTP_GET_VARS);

while(list(clave,clave,val)=each($HTTP_POST_VARS)){

$$clave=$val;

}

?>

that's it.

1 comment

Comments from the old blog, as they were written. Comments are closed.

  1. Law (refeaturing Oriol)

    while(list($clave_file, $val_file)=each($HTTP_POST_FILES)) {
    $$clave_file=$val_file; }