php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18860 4.2.2 breaks if/else statements
Submitted: 2002-08-11 16:31 UTC Modified: 2002-08-11 16:41 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: nmk at iki dot fi Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.2.2 OS: Solaris 8
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: nmk at iki dot fi
New email:
PHP Version: OS:

 

 [2002-08-11 16:31 UTC] nmk at iki dot fi
I had a simple script that is useless after I installed
php-4.2.2. Before I was using 4.1.0 and it worked fine.

It seems that in the php-4.2.2 it doesn't, for some odd reason, understand the posted $submit variable in the if-statement.

Any ideas?

- Niko

-- SCRIPT STARTS --

<?php

if($submit)
{
  echo $tellme;
} else {

?>
<h1>Tell me!</h1>

<form method="post" action="this-script.php">
<textarea name="tellme"></textarea>
<input type="Submit" name="submit" value="Tell it!">
</form>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-11 16:35 UTC] nmk at iki dot fi
I had a simple script that is useless after I installed
   php-4.2.2. Before I was using 4.1.0 and it worked fine.

   It seems that in the php-4.2.2 it doesn't, for some odd reason,
   understand the posted $submit variable in the if-statement.

   Any ideas?

   - Niko

   -- SCRIPT STARTS --

   <?php

   if($submit)
   {
     echo $tellme;
   } else {

   ?>
   <h1>Tell me!</h1>

   <form method="post" action="this-script.php">
   <textarea name="tellme"></textarea>
   <input type="Submit" name="submit" value="Tell it!">
   </form>
<?php
}
?>
 [2002-08-11 16:41 UTC] rodif_bl@php.net
In PHP 4.2.0, the 'register_globals' setting default changed to
be off. See http://www.php.net/release_4_2_0.php for more info.
We are sorry about the inconvenience, but this change was a necessary
part of our efforts to make PHP scripting more secure and portable.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC