Code:
if (IN PHP) I call $cart->insert_Pcart($item1, $item2); class Cart { : function insert_Pcart($item_name,$p_qty) { $insert = "INSERT INTO Cart (pname, qty) VALUES ($_POST[$item_name]','$_POST[$p_qty]')"; [B]Line69=> if (mysql_query($insert, $conn)) { $cartID = mysql_insert_id($conn);[/B] } else { die ("Error inserting CART FORM data: " .mysql_error()); }; //$p_name=($_REQUEST["p_name"]); }
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in c:\phpdev\www\p roject_shopping _cart.php on line 69
Error inserting CART FORM data:
Can anyone explain what this error means or how I might fix it?
Comment