Hey Im making an online store and cant figure out the section on inserting data into a table (in this case its inserting customer details into a customer table). Its the VALUES line that is displaying the error: mysql_query() expects parameter 1 to be string, resource given. I have looked at other similiar problems on this but havent been able to solve the issue
Any HELP would be greatly appreciated??
/*** 4. trying to insert the data from into table, the result of query are returned in a variable $insertedData
$insertedData = mysql_query($serverConnection, "INSERT INTO customertable(CustomerID, FirstName, SurName, Address, PhoneNum, Email, PurchaseProduct)
VALUES('$_POST[Customer_ID]', '$_POST[First_Post]', '$_POST[Sur_Name]', '$_POST[Cus_Address]', '$_POST[Phone_Num]', '$_POST[Cus_Email]' '$_POST[Product_Purchase]')");
if($insertedData) // If data insertion was successful
echo "<br> Data Insertion Success";
else // If data insertion was unsuccessful
echo "<br> Data Insertion Unsuccessful!";