note 30257 modified in language.variables.external by danbrown
| From: | danbrown@php.net | Date: | Wed, 09 Mar 2011 14:44:54 +0000 |
| Subject: | note 30257 modified in language.variables.external by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-177716@lists.php.net to get a copy of this message | ||
If you have form data that could be coming in via either GET or POST and register_globals is off (as
it should be) use the empty() function to find out where the data is coming from, as in the
following example
<?php
if(empty($_GET)) {
$clientfilter = $_POST['clientfilter'];
$branchfilter = $_POST['branchfilter'];
}
if(empty($_POST)) {
$clientfilter = $_GET['clientfilter'];
$branchfilter = $_GET['branchfilter'];
}
?>
--was--
If you have form data that could be coming in via either GET or POST and register_globals is off (as
it should be) use the empty() function to find out where the data is coming from, as in the
following example
if(empty($_GET)) {
$clientfilter = $_POST['clientfilter'];
$branchfilter = $_POST['branchfilter'];
}
if(empty($_POST)) {
$clientfilter = $_GET['clientfilter'];
$branchfilter = $_GET['branchfilter'];
}
Big thank you to all the people posting helpful comments on these boards, I dont know what i'd
do without you. <a href="www.paulodeon.com">www.paulodeon.com</a>
http://php.net/manual/en/language.variables.external.php