I'm a little speechless. It's such a simple statement, but I searched for a long time and couldn't find out why the data couldn't be inserted.
There is no problem with the local database. It should be a code problem, but I am blinded and cannot find the error. Please help me.
##There is no data at the end, the links are all normal, and there is no problem in submitting data from other web pages.
漂亮男人2017-05-16 13:15:55
Finally I found the correct answer. declare is a system reserved keyword, so this database table cannot be used. . . After all, he is too young. . .
黄舟2017-05-16 13:15:55
Your MySQL port seems to be 3305, but you did not specify it. The default port is 3306.
phpcn_u15822017-05-16 13:15:55
First of all, it is not recommended to use MySQL extension, it is unsafe, and PHP has been abandoned. Use MySQLi or PDO.
Secondly. If the execution fails, use mysql_error()
to obtain the error information.