Can anybody help – I’ve been going over this problem for days and can’t find a solution! I am trying to pass the values from one page to another in hidden values. All of my values are being echoed properly on the second page except those that are in the array. The values in the array are just being echoed as the word “Array”. As I will be eventually passing the value into another system I cannot declare any of the variables on the second page, but if do echo them, then the code works correctly (so I know the code is correct). Does anybody know if I need to add some more code for passing array variables through form fields?
My code is as follows;
My code is as follows;
Code:
echo"<form target=\"_self\" action=\"test.php\" method=POST>";
$OKCode = "ADDI";
$TARGET = "_top";
$CALLER = "CTLG";
$sql_select = mysql_query( "select * from ".$prefix."store_customer, store_company where store_customer.company_id=store_company.company_id and email='$email'");
while ($row = mysql_fetch_array($sql_select)){
$EMAIL =$row["email"];
$PASSWORD =$row["password"];
}
$contents = $cart->display_contents($prefix,$temp_session,$sale);
if($contents[product][0] != "")
{
$i = 0;
while($i != $cart->num_items($prefix,$temp_session))
{
$CODE = $contents[CODE][$i];
$CURRENCY = $contents[currency][$i];
$UNIT = $contents[uom][$i];
$PRICE = $contents[price][$i];
$CARTTOTAL = $contents[total][$i];
$QUANTITY = $contents[quantity][$i];
$i ++;
PRINT "
<input type=\"hidden\" size=\"100\" name=\"EMAIL\" value=\"$EMAIL\">
<input type=\"hidden\" size=\"100\" name=\"PASSWORD\" value=\"$PASSWORD\">
<input type=\"hidden\" size=\"100\" name=\"CODE[$i]\" value=\"$CODE\">
<input type=\"hidden\" size=\"100\" name=\"QUANTITY[$i]\" value=\"$QUANTITY\">
<input type=\"hidden\" size=\"100\" name=\"PRICE[$i]\" value=\"$PRICE\">
<input type=\"hidden\" size=\"100\" name=\"UNIT[$i]\" value=\"$UNIT\">
<input type=\"hidden\" size=\"100\" name=\"CURRENCY[$i]\" value=\"$CURRENCY\">
<input type=\"hidden\" size=\"100\" name=\"CARTTOTAL[$i]\" value=\"$CARTTOTAL\">
<input type=\"hidden\" size=\"100\" name=\"OKCode\" value=\"$OKCode\">
<input type=\"hidden\" size=\"100\" name=\"TARGET\" value=\"$TARGET\">
<input type=\"hidden\" size=\"100\" name=\"CALLER\" value=\"$CALLER\">";
echo"</form>";
}
}