Thursday, June 19, 2008

GET / POST in PHP

If you are not sure whether any form submission which is passed to a php is GET or POST , you can try the following line to work in both condition.


----------------------------------------------------------------------------------------------------------------------
$client_id = $_POST['client_id'] ? $_POST['client_id'] : $_GET['client_id'];
----------------------------------------------------------------------------------------------------------------------

No comments: