php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23024 Problems with iframe
Submitted: 2003-04-02 12:12 UTC Modified: 2003-04-03 02:50 UTC
From: elhumero at hotmail dot com Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 4.3.2RC1 OS: Windows 2000 prof
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: elhumero at hotmail dot com
New email:
PHP Version: OS:

 

 [2003-04-02 12:12 UTC] elhumero at hotmail dot com
Archive x.htm
<form name="xx" method="post" action="probe.php">
<input type="checkbox" value="1" OnClick="javascript:document.xx.submit();" <?php if ($_POST[checkbox]==1) { print "CHECKED"; } ?>>
<iframe>
   <form name="xx" method="post" action="probe.php">
      <input type="checkbox" value="1" OnClick="javascript:document.xx.submit();" <?php if ($_POST[checkbox]==1) { print "CHECKED"; } ?>>
   </form>
</iframe>
</form>

probe.php 
<?php
print_r($_POST);
require("x.htm");
?>

When I execute this code in Apache 2 under windows 2000, then the result of the first time is correct, outside the iframe and inside it, but the second or the third time, the result it like this ARRAY(checkbox=1)ARRAY(checkbox=1)ARRAY(checkbox=1)ARRAY(checkbox=1)ARRAY(checkbox=1)ARRAY(checkbox=1)ARRAY(checkbox=1)..., and the the OS send me an apache memory error, but the apache still running.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-03 00:31 UTC] nicos@php.net
Your code is bogus.

Please contact the good list: php-general@lists.php.net.

Not a bug -> Bogus
 [2003-04-03 02:50 UTC] elhumero at hotmail dot com
This is the real code, please try this.

priframe.htm
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form name="XX" method="post" action="show.php">
  <table width="100%" border="1" cellspacing="0" cellpadding="0">
    <tr> 
      <td><table width="100%" border="1" cellspacing="0" cellpadding="0">
          <tr> 
            <td><input type="text" name="text1" value="<?php print $_POST[text1]; ?>" onBlur="document.XX.submit();"></td>
          </tr>
          <tr> 
            <td><input type="radio" name="radiobutton" value="1" onClick="document.XX.submit();" <?php if ($_POST[radiobutton]== 1) print "CHECKED";?>> 
              <input type="checkbox" name="checkbox" value="1" onClick="document.XX.submit();"  <?php if ($_POST[checkbox]== 1) print "CHECKED";?>>
              Valor 1</td>
          </tr>
          <tr> 
            <td><input type="radio" name="radiobutton" value="2" onClick="document.XX.submit();" <?php if ($_POST[radiobutton]== 2) print "CHECKED";?>> 
              <input type="checkbox" name="checkbox2" value="2" onClick="document.XX.submit();"  <?php if ($_POST[checkbox2]== 2) print "CHECKED";?>>
              Valor 2 </td>
          </tr>
          <tr> 
            <td><input type="radio" name="radiobutton" value="3" onClick="document.XX.submit();" <?php if ($_POST[radiobutton]== 3) print "CHECKED";?>> 
              <input type="checkbox" name="checkbox3" value="3" onClick="document.XX.submit();"  <?php if ($_POST[checkbox3]== 3) print "CHECKED";?>>
              Valor 3</td>
          </tr>
          <tr> 
            <td><iframe height="100%" width="100%" src="form2.htm"> </iframe></td>
          </tr>
          <tr> 
            <td><input type="radio" name="radiobutton" value="4" onClick="document.XX.submit();" <?php if ($_POST[radiobutton]== 4) print "CHECKED";?>> 
              <input type="checkbox" name="checkbox4" value="4" onClick="document.XX.submit();"  <?php if ($_POST[checkbox4]== 4) print "CHECKED";?>>
              Valor 4 </td>
          </tr>
          <tr> 
            <td><input type="radio" name="radiobutton" value="5" onClick="document.XX.submit();" <?php if ($_POST[radiobutton]== 5) print "CHECKED";?>> 
              <input type="checkbox" name="checkbox5" value="5" onClick="document.XX.submit();"  <?php if ($_POST[checkbox5]== 5) print "CHECKED";?>>
              Valor 5</td>
          </tr>
        </table></td>
    </tr>
    
  </table>
</form>
</body>
</html>
form2.htm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form method="post" action="show.php" name="XX">
  <table width="100%" border="1" cellspacing="0" cellpadding="0">
    <tr> 
      <td><input type="text" name="text1" value="<?php print $_POST[text1]; ?>" onBlur="document.XX.submit();"></td>
    </tr>
    <tr> 
      <td><input type="radio" name="radiobutton" value="1" onClick="document.XX.submit();" <?php if ($_POST[radiobutton]== 1) print "CHECKED";?>> 
        <input type="checkbox" name="checkbox" value="1" onClick="document.XX.submit();"  <?php if ($_POST[checkbox]== 1) print "CHECKED";?>>
        Valor 1</td>
    </tr>
    <tr> 
      <td><input type="radio" name="radiobutton" value="2" onClick="document.XX.submit();" <?php if ($_POST[radiobutton]== 2) print "CHECKED";?>> 
        <input type="checkbox" name="checkbox2" value="2" onClick="document.XX.submit();"  <?php if ($_POST[checkbox2]== 2) print "CHECKED";?>>
        Valor 2 </td>
    </tr>
    <tr> 
      <td><input type="radio" name="radiobutton" value="3" onClick="document.XX.submit();" <?php if ($_POST[radiobutton]== 3) print "CHECKED";?>> 
        <input type="checkbox" name="checkbox3" value="3" onClick="document.XX.submit();"  <?php if ($_POST[checkbox3]== 3) print "CHECKED";?>>
        Valor 3</td>
    </tr>
    <tr> 
      <td><input type="radio" name="radiobutton" value="4" onClick="document.XX.submit();" <?php if ($_POST[radiobutton]== 4) print "CHECKED";?>> 
        <input type="checkbox" name="checkbox4" value="4" onClick="document.XX.submit();"  <?php if ($_POST[checkbox4]== 4) print "CHECKED";?>>
        Valor 4 </td>
    </tr>
    <tr> 
      <td><input type="radio" name="radiobutton" value="5" onClick="document.XX.submit();" <?php if ($_POST[radiobutton]== 5) print "CHECKED";?>> 
        <input type="checkbox" name="checkbox5" value="5" onClick="document.XX.submit();"  <?php if ($_POST[checkbox5]== 5) print "CHECKED";?>>
        Valor 5</td>
    </tr>
  </table>
  </form>
</body>
</html>

show.php
<?php
   print_r($_POST);
   require(basename($_SERVER['HTTP_REFERER']));
?>


And this is the result of the second execution:
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
Array
(
    [text1] => 
    [radiobutton] => 1
    [checkbox] => 1
)
.
.
.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jun 26 05:01:31 2024 UTC