Hello, I am having a bit of a problem with my code.
I have to link a php form with a mysql database.
I know it is relativley simple, but I have been looking at my code for hours, and I can't find what is wrong.
I have a sample of my code below:
Any guidence is appreciated.
$name=$_POST['name'];
$products=$_POST['products'];
$email=$_POST['email'];
$connect=mysql_connect("localhost","student_user","student");
if (mysqli_connect_error())
{ printf("connect failed: %s \n",mysqli_connect_error());
}else{
} mysql_select_db("Proj_DB");
$sql="INSERT INTO 'customers' VALUES('$user', '$products',' $email')');
$result= mysql_query($sql)
if ($result){
echo("Record added.");
} else{
echo("insert failed");
}