Pretty new to php and everything, but is there an easy way to have $HTTP_POST_VARS push out all the results with having to type $HTTP_POST_VARS['fieldx'] each time?
Thanks in advance!
actually now it's $POST and $GET (since 4.1.0 I think).
If you wanna be able to use the variables without any prefix just change register_global to 1 in the ini file... if you can't, use $POST and $GET.
Hmm.. Yeah, I guess what I was actually looking for is an easy way to take all the variables that were posted to $HTTP_POST_VARS and push them out. I have a form with a lot of fields and don't really want to have to type $HTTP_POST_VARS['field'] or $_POST['field'] 50 times.
er... "push them out"? if you mean dump them to the appropriate variable names then
while(list($key, $val)=each($_POST)) $$key == $host;
should do the trick.
Wouldn't this work also?
extract($_Get); Then use the variables you need.
Yeah...
extract($GET); extract($POST);
seems like the easier way to go.