[SOLVED] knowing how the user got to a page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jasongr
Forum Contributor
Posts: 206
Joined: Tue Jul 27, 2004 6:19 am

knowing how the user got to a page

Post by jasongr »

Hello

Assuming I have a PHP page that the user may come to either via GET or via POST, is there a way of knowing in which method a current request was made?
Are the $_GET and $_POST always available?
If so, how can I tell if I should refer to the $_GET or the $_POST array?

regards
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

$_SERVER['REQUEST_METHOD']
jasongr
Forum Contributor
Posts: 206
Joined: Tue Jul 27, 2004 6:19 am

Post by jasongr »

thanks
this is what I needed
Post Reply