Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000006 [Quercus] minor always 11-27-05 10:01 12-30-05 18:18
Reporter creich View Status public  
Assigned To creich
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.0.18 Product Version
  Product Build
Summary 0000006: extract($_POST) does not work for arrays posted to a Quercus page
Description When you submit the following html form:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd"> [^]
<html xmlns="http://www.w3.org/1999/xhtml"> [^]
<head>
    <title>Football Picks</title>
</head>
<body>
<form action="extractpost.php" method="post">
<table width="30%">
    <tr>
        <td><input type="radio" name="picks[1]" value="New Orleans">New Orleans</td>
        <td>at</td>
        <td><input type="radio" name="picks[1]" value="Buffalo">Buffalo</td>
    </tr>
    <tr>
        <td><input type="radio" name="picks[2]" value="New England">New England</td>

        <td>at</td>
        <td><input type="radio" name="picks[2]" value="Cincinnati">Cincinnati</td>
    </tr>
    <tr>
        <td><input type="radio" name="picks[3]" value="Seattle">Seattle</td>
        <td>at</td>
        <td><input type="radio" name="picks[3]" value="Cleveland">Cleveland</td>
    </tr>
    <tr>
        <td><input type="radio" name="picks[4]" value="Tampa Bay">Tampa Bay</td>
        <td>at</td>
        <td><input type="radio" name="picks[4]" value="Dallas">Dallas</td>
    </tr>
    <tr>
        <td colspan="3" width="100%" align="center" valign="top"><input type="submit"

name="Submit" value="Submit!">

    </tr>
</table>
</form>
</body>
</html>

to this PHP page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd"> [^]
<html xmlns="http://www.w3.org/1999/xhtml"> [^]
<head>
    <title>Football Picks</title>
</head>
<body>
<?php

extract($_POST);

foreach ($picks as $pick) {
  echo "$pick
\n";
}

?>
</body>
</html>

You are supposed to see a list of all the "$picks." But extract in quercus doesn't handle arrays posted in forms.
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0000001)
creich
11-28-05 13:28
edited on: 11-28-05 13:36

This is a $_POST problem, not an extract problem.

<?php

var_dump($_POST['picks']);

?>

This should return an array with 4 elements.

It currently returns NULL.

 
(0000613)
ferg
12-30-05 18:18

php/0801, php/0819
 

- Issue History
Date Modified Username Field Change
11-27-05 10:01 creich New Issue
11-28-05 13:28 creich Note Added: 0000001
11-28-05 13:28 creich View Status @0@ => public
11-28-05 13:36 creich Note Edited: 0000001
11-30-05 08:42 ferg Status new => assigned
11-30-05 08:42 ferg Assigned To  => creich
12-30-05 18:18 ferg Status assigned => closed
12-30-05 18:18 ferg Note Added: 0000613
12-30-05 18:18 ferg Resolution open => fixed
12-30-05 18:18 ferg Fixed in Version  => 3.0.18


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
32 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker