Posted by David Haynes on 05/18/06 13:15
Dynamo wrote:
> Hi,
>
> How can I display all of the variables held in the $_POST array on my web page?
>
> For example:
>
> <form method="POST" action="displayspostarray.php">
> <?php
> while($row = mysql_fetch_row($result)) {
> echo "<tr>";
> echo "<td>" . $row[0] . "</td>";
> echo "<td><a href='desc.php?image=$row[0]'><img border='0'
> src='/thumbnails/$row[2]'></a></td>";
> echo "<td>" . $row[3] . "</td>";
> echo "<td>£" . $row[6] . "</td>";
> echo "<td>" . $row[7] . "</td>";
> echo "<td>£" . $row[8] . "</td>";
>
> ?>
> <td><input type='checkbox' name='<?php echo $row[0];?>' value='ON'></td>
> </tr>
> <input type="submit" value="Test">
> </form>
>
> I want displayspostarray.php to list all of the variables held in the $POST
> array.
>
> Hope that makes sense.
>
> Regards
> Dynamo
>
>
>
<?php
echo "<pre>\n";
print_r($_POST);
echo "</pre>\n";
?>
-david-
[Back to original message]
|