Having problems trying to pass hidden vars
Posted: Tue Dec 02, 2008 6:57 am
Hi all
I'm trying to pass 5 hidden arrays from script 1 to script 2 below but all I'm getting from the echos in script 2 are 'A's, short for 'Array'. There's something stupidly obvious that I'm missing - probably from the form itself - but I can't figure out what it is. Any help is very much appreciated.
Thanks, Steve
script 1:
script 2:
I'm trying to pass 5 hidden arrays from script 1 to script 2 below but all I'm getting from the echos in script 2 are 'A's, short for 'Array'. There's something stupidly obvious that I'm missing - probably from the form itself - but I can't figure out what it is. Any help is very much appreciated.
Thanks, Steve
script 1:
Code: Select all
print ("<form action='http://www.mywebsite.co.uk/catalog/index.php?main_page=seller_confirmation' method='post'>");
print ("<div style='float:right' > <input class='mybtn' SIZE='5' type='submit' name='confirm_db_update' value='Confirm'> </div>");
print ("<input type='hidden' name='productid' id='productid' value= ".$productid. "/>");
print ("<input type='hidden' name='qty' id='quantity' VALUE = ".$qty. "/>");
print ("<input type='hidden' name='price' id='price' VALUE =".$price. "/>");
print ("<input type='hidden' name='shipping' id='shipping' VALUE =".$shipping. "/>");
print ("<input type='hidden' name='sdprice' id='sdprice' VALUE =".$sdprice. "/>");
print ("</form>");Code: Select all
if(isset($_POST['confirm_db_update']))
{
$productid=$_POST['productid'];
$qty=$_POST['qty'];
$price=$_POST['price'];
$shipping=$_POST['shipping'];
$sdprice=$_POST['sdprice'];
echo $productid[0];
echo $qty[0];
echo $price[0];
echo $shipping[0];
echo $sdprice[0];
...