faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

1 of 1 people (100%) answered Yes
Recently 1 of 1 people (100%) answered Yes

Entry

how can i know that a page is using a GET method or POST method without checking the URL

Jul 13th, 2006 10:14
Chris Thompson, vijesh Nair,


<code>
//  this page received a GET
if($_GET){
    echo 'GET happened';
}
//  this page received a POST
if($_POST){
    echo 'POST happened';
}
</code>