Hi I am new to PHP and SQL and getting these errors..
Can't attach the data to my database and can't find the back spaces...
The code that I am working on it is
Thanks for the solution in advance...
<?php
$con=mysqli_connect("localhost","root","","nova");
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
;
$sql="INSERT INTO signup_form(name,email,contact,subject,message) VALUES('$_POST['name']','$_POST['email']','$_POST['contact']','$_POST['subject']','$_POST['message']')";
if(!mysqli_query($con,$sql))
{
die('Error: ' . mysqli_error($db));
}
echo "1 record added succesfully";
mysqli_close($con);
?>
NE