I write the implementation of the registration function of the page, in the connection database bar data inserted in the database, the following problem occurs, the error message is:
Warning:mysql_query () [Function.mysql-query]: Access denied for user ' ODBC ' @ ' localhost ' (using password:no) in F:\wamp\w ww\biyesheji\html\reg_chk.php on line 18
Warning:mysql_query () [function.mysql-query]: A link to the server could not being established in F:\wamp\www\biyesheji\html \reg_chk.php on line 18
I checked the database name, the data table name, and the password (empty) are correct, but my database user name is root, why the error prompt will appear in ODBC, the Daniel help me, all tangled day, thank you thanks ...
Reply to discussion (solution)
Check the database connection code for the user name and password are not written correctly
With your ODBC prompt does not matter, it is not prompted you do not have a password, you need to give your MySQL account to create a password
Mysql>set Password =password (' your password '); Mysql>flush privileges;
My several pages do not have the password can also run Ah, this problem, the database code in the user name, the password is not wrong
Does your database connection code add @?
@mysql_connect (self:: $dbhost, Self:: $dbuser, Self:: $dbpassword);
@mysql_select_db (self:: $dbname);