I am very new to PHP, I was taking a tutorial, and I learned this code, but I am afraid I don't understand it like I thought I did.
while(list($key,$val)=each($_REQUEST)){
$$key = stripslashes( $val );
}
I was under the impression that that made each variable work as they are named, for instance,
<input type="text" name="cook" size="10" value"Cornbread">
Then $cook would equal "Cornbread".
However, It is not working.
When I was doing a bunch of different things in a test.php file, It worked without me having to do that. But now that I added functions to the file, it is not working at all, unless I put
$_POST['cook']
That works. Do I have to use $_POST[''] on every one of them?
Some of them are using GET instead of POST.
That could get very annoying.
Any ideas on what I need to do different?