You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 4
y este es mi codigo:
Código PHP:
<?
include('../include/database_connection.php');
?>
<?
if($_POST['yes']=='1'){
$username=$_POST[username];
$password=$_POST[password];
$email=$_POST[email];
$firstname=$_POST[firstname];
$lastname=$_POST[lastname];
$dateofbirth=$_POST[dateofbirth];
$country=$_POST[country];
mysql_query('INSERT INTO noticias (username, password, Email, Name, Lastname, Date, Country)
VALUES ("' . $username . '", "' . $password . '", "' . $email . '", "' . $firstname . '",
"' . $lastname . '", "' .$dateofbirth. '", "' .$country. '"') or $error = true;
if(isset($error))
echo 'We are sorry, but you were not able to register, please contact the administrator.<br><small>' . mysql_error() . '</small>';
else
echo 'Registration successful! Now you can <a href="login.php">Log In</a>.';
exit;
}
header("location: index.php");
?>