Re: value error in PHP form
| From: | Jason Wong | Date: | Thu, 24 Jun 2004 16:16:22 +0000 |
| Subject: | Re: value error in PHP form | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-34930@lists.php.net to get a copy of this message | ||
On Thursday 24 June 2004 18:07, Rinku wrote:
> I had written the code :
> if(isset($_POST['Variable1'])&&isset($_POST['Variable2']))
> {
> Print "Rinku";
> }
> Here, even if variables are not set then even I am getting Output as
> "Rinku".
Some form elements, eg <input type="text" ...>, are always "isset()" even
when
you haven't entered anything into them. If you want to check that something
has been entered into them then use:
if (!empty($POST['doo'] ...
but depending on what type of inputs your application accepts you may have to
do further tests.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
------------------------------------------
/*
QOTD:
"Don't let your mind wander -- it's too little to be let out alone."
*/