Code: Select all
andCode: Select all
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I have a form with this piece of code.
PAGE1:Code: Select all
<?php
for ($x = 0; $x < $ingrediants; $x++)
{
echo "Qty: <INPUT TYPE='text' NAME='qty".$x."' size='5'> ";
myfunction($x);
echo "Items: <INPUT TYPE='text' NAME=items".$x."'><br>";
}
function myfunction($x)
{
$Sql_statement = "Select field From table";
$Query = Mysql_query($Sql_statement);
If (!$Query) {
Die('Invalid Query: ' . Mysql_error());
}
echo "<SELECT NAME='name".$x."'>";
While ($Row = Mysql_fetch_assoc($Query)) {
echo "<option value='" . $types = $Row['field'] . "'>" . $types = $Row['field'];
}
echo "</SELECT>";
}
?>I have an include page (in the PAGE2) which gets all my data from the form
Code: Select all
session_start();
$ArrayList = array("_GET", "_POST", "_SESSION", "_COOKIE", "_SERVER");
foreach($ArrayList as $gblArray)
{
$keys = array_keys($$gblArray);
foreach($keys as $key)
{
$$key = trim(${$gblArray}[$key]);
}
}I am trying to display the data from PAGE1 on PAGE2
Code: Select all
<?php
for ($x = 0; $x < $ingrediants; $x++)
{
echo "QTY: ".$field.$x"<br>";
}
?>feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]