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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 22 04:01:30 2025 UTC