Page 1 of 1
count($_REQUEST) returning wrong parameters
Posted: Sat Feb 19, 2011 7:22 am
by kgtrm
Sir,when i used count($_REQUEST) to count the number of parameters that the page has received,sometimes i am getting correct values , but sometimes i am getting wrong values.If the parameters are 4,sometimes i am getting as 4,but sometimes i am getting as 5.What can be the reason? I checked with different browsers,but i got problem with both browsers.Means,its not browser fault.Please solve this.
Thankyou.
Re: count($_REQUEST) returning wrong parameters
Posted: Sat Feb 19, 2011 7:28 am
by kgtrm
i found the reason sir,but i need solution for this.
Reason is,i am having a contact.php in my website. And,all these parameters are related to index.php
When i open contact.php,the parameters count to index.php is being increased by one.But if i see the URL,it contains only correct number of parameters.
If i dont open contact.php,and if i just use index.php,the parameters count is correct.Getting problem only when i open contact.php.
What is the solution for this.
Thankyou.
Re: count($_REQUEST) returning wrong parameters
Posted: Sat Feb 19, 2011 7:58 am
by Darhazer
$_REQUEST contains all parameters from $_GET, $_POST and $_COOKIE
if you are using $_POST method for your forms, use count($_POST)
Re: count($_REQUEST) returning wrong parameters
Posted: Sat Feb 19, 2011 8:01 am
by kgtrm
thanks a lot...i will try that..