I am trying to complete an SQL insert query using php. The error I am returned with is: SCREAM: Error suppression ignored for Parse error: syntax error, unexpected T_STRING in C:\wamp\www\sign\db.php on line 28
I am using wamp and I have tested the query directly in php myadmin and it works fine. I don't know what the problem is.
Thanks in advance.
<?php
//variables for db
$username = "root";
$password = "";
$hostname = "127.0.0.1";
$dbname = "site";
//connection to the database
$con = mysql_connect($hostname, $username, $password);
if($con == FALSE)
{
echo 'Cannot connect to database' . mysql_error();
}
mysql_select_db($dbname, $con);
mysql_query("INSERT INTO users (full_name, first_name, dob, star_sign) VALUES ("test","test", "test", "test");";
?>