php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8489 Function empty() does not work
Submitted: 2000-12-30 00:29 UTC Modified: 2001-03-06 06:53 UTC
From: wangbo999 at hotmail dot com Assigned:
Status: Closed Package: *Function Specific
PHP Version: 4.0.4 OS: Windows NT4.0(sp6)
Private report: No CVE-ID: None
 [2000-12-30 00:29 UTC] wangbo999 at hotmail dot com
a Form is as follow:
<form method="POST" action="accept_form.php">
<input name="demo1" type="text" value="">
<input type="submit" name="submit" value="go">
</form>

In the server, accept_form.php is as follow:
....
<script language="PHP">
  if(empty($demo1)
   {
             echo "demo1 is empty";
   }
</script>
....

Although I entered something is "demo1", empty() always returns true, and isset() works properly. what  is the problem? thank you.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-08 13:52 UTC] stas@php.net
What is your register_globals setting? if you insert
var_dump($demo1) before if, what it prints?
 [2001-03-06 06:53 UTC] stas@php.net
No feedback, closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 18:02:40 2024 UTC