PHP connection to MySQL. Help
If (@ $ _ POST ["submit"]) {
$ Id = $ _ POST ["id"];
$ Name = $ _ POST ["name"];
$ Age = $ _ POST ["age"];
$ Tel = $ _ POST ["tel"];
$ Address = $ _ POST ["address"];
$ Conn = @ mysql_connect ("localhost", "root", "ROOT") or die ("database connection times out. please try again later! ");
Mysql_select_db ("test", $ conn );
Mysql_query ("set names 'utf8 '");
$ SQL = "select * from 'student "';
$ SQL = "INSERT INTO 'student '('id', 'name', 'age', 'Tel', 'address') VALUES ('$ ID ', '$ name',' $ age', '$ tel', '$ address ')";
Mysql_query ($ SQL );
}
?>
This is the data table I created. it is null to add data generation and refresh the data table on the page. What is the problem?
Reply to discussion (solution)
The entered text encoding is inconsistent with the database encoding.
Can you be specific. How to modify. Thank you.
Mysql_query ($ SQL) or die (mysql_error () to see what the error is?
No error reported... thanks for your help.