PHP database MySQL
Include ("connection.php");
if (Isset ($_post["sub"])) {
$title =$_post[' title ';
$con =$_post[' con '];
$sql = "INSERT INTO ' news ' (' IDs ', ' title ', ' dates ', ' contents ') VALUES (null, ' $title ', now (), ' $con ')";
mysql_query ($sql);
echo "Insert Success"; Data is not entered into the database after submission
}else{
echo "Insert Failed". Mysql_error ();
}
?>
Reply to discussion (solution)
mysql_query ($sql) or Die (Mysql_error ()); Do you have any errors?
I got it. Because the ID cannot be null but my phpmyadmin doesn't automatically increment this one.
mysql_query ($sql) or Die (Mysql_error ()); Do you have any errors?
Yes, but what about the problem with no incremental entry?
ID primary key, insert data automatically increment yes.
Auto_increment Property
Thank you all for finding the new version of phpMyAdmin is a_i the problem has been solved