This looks ok to u? I now need to send these array values to a function so as they will be added, but the customer id isn't added. Here is the code I'm using:
function add_item($table,$session,$product,$quantity,$cost_price,$cust_id)
{
// Checks to see if they already have that product in their list
$in_list = "SELECT * FROM $table WHERE session='$session' ";
$in_list .= "AND product='$product'";
$result = mysql_query( "$in_list");
$num_rows = mysql_num_rows($result);
if($num_rows == 0)
{
$sql = "INSERT INTO $table (session,product,quantity,cost_price,cust_id) VALUES ";
$sql .= "('$session','$product','$quantity','$cost_price','$cust_id')";
mysql_query( "$sql");
}
Any ideas as to why the customer id is not added ( in MySQL it remains as 'o')??