Mantis - Quercus
Viewing Issue Advanced Details
6 minor always 11-27-05 10:01 12-30-05 18:18
creich  
creich  
normal  
closed  
fixed  
none    
none 3.0.18  
0000006: extract($_POST) does not work for arrays posted to a Quercus page
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.

Notes
(0000001)
creich   
11-28-05 13:28   
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