I have retrieved certain data from database and placed them in a variable i.e.,
$pid=$_SESSION['data'][$i]['productid'];
$q=$_SESSION['data'][$i]['qty'];
$pname=get_product_name($pid);
$price = get_price($pid);
$list.=$list."productid:". $pid."\n".",productname:".$pname.",\nquantity".$q."\n price:".$price.";";
The variable data is of the form:
$items=productid:1 ,productname:aaa, quantity1 price:100;productid:2 ,productname:ccc, quantity2 price:120;
now i need to send this data to another page and store that variable into a another table of same database. What i have done is i passes that variable using the url:
<a href="prdbilling.php?list=<?php echo $list?>"/>Place Order</a>
and in product billing page i need to add this variable along with other data into a table: Mycode for inserting data into database is:
$insertquery=mysql_query("insert into customers(name,email,address,phone,orderlist) values('{$_POST['name']}','{$_POST['email']}','{$_POST['address']}','{$_POST['phone']}','$list')");
but it is not working can any one give suggestions. thanks in advance.