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
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: cbaltaci at gtechnics dot com
New email:
PHP Version: OS:

 

 [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: Wed May 01 22:01:31 2024 UTC