php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14183 Can read POSTed veriable
Submitted: 2001-11-22 15:22 UTC Modified: 2001-11-22 15:32 UTC
From: cbaltaci at gtechnics dot com Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.0.4pl1 OS: RedHat6.1
Private report: No CVE-ID: None
 [2001-11-22 15:22 UTC] cbaltaci at gtechnics dot com
On RedHat7.1 Box with apache generate a HTML form. 
put a dropdown menu as form element.
ie :
<pre>
<form name="test" action="bug.php" method="POST">
<select name="pop" >
<option value="0">NO</option>
<option value="1">NO</option>
<input type="Submit" name="Submit_Button" value="Send Values">
</pre>

bug.php
<pre>
<?
if($pop){
   echo "There isnt any bug";
 } else {
   echo "Ops!";
}
?>
</pre>


If $pop=0 then engine cant read this value, and print "Ops!"

I did try this on 3 servers that uses RedHat7.1 with PHP Version 4.0.3pl1. 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-22 15:32 UTC] hholzgra@php.net
a value of zero evaluates as false

you want to check 

  if ( isset($pop) )

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 18:01:28 2024 UTC