Page 1 of 1

knowing how the user got to a page

Posted: Tue Oct 05, 2004 12:05 am
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

Posted: Tue Oct 05, 2004 12:59 am
by feyd
$_SERVER['REQUEST_METHOD']

Posted: Tue Oct 05, 2004 1:25 am
by jasongr
thanks
this is what I needed