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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: wangbo999 at hotmail dot com
New email:
PHP Version: OS:

 

 [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: Wed May 01 17:01:29 2024 UTC