Jump to content

$_REQUEST


gotornot

Recommended Posts

Hi

 

Justa quicky about the $_REQUEST

 

I am collecting data either posted or egt to my script i have variables that are predefined ie name, address etc.

The data is being passed via another web server (another company) they send unique replies to questions that i ask of them for example

 

http://www.mysite.com/myscrip.php?name=bob&surname=Bits&1=yesplease&3=nothanks

 

The 1 and 3 are 2 questions asked however how owuld i collect them as theyy are not predfined?

 

can i do this:

 

$var = $_REQUEST['WHAT GOES HERE????'];

 

How would i solve this problem?

 

Many Thanks

 

Andy

Link to comment
https://forums.phpfreaks.com/topic/189149-_request/
Share on other sites

$_REQUEST works exactly the same as $_POST and $_GET except it will grab either or both of them.  I'm not sure if you have the same variable in the url as you do in your form which one will override the other but my thought would be the $_POST.

 

It works the same as both like this, $_REQUEST['your variable'].

Link to comment
https://forums.phpfreaks.com/topic/189149-_request/#findComment-998718
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.