When php reads data from the database, ie8 can obtain the data. browsers such as chrome, 360, and ff cannot obtain the data. This post was last edited by vic90 at 16:55:13 on.
Browser php mysql
This is my php code. I want to get the content of the z_register data table, which can be obtained through IE browser, but cannot be obtained through chrome, 360, FF, or other browsers.
When chrome, 360, FF, and other browsers are running, the message "mysql_fetch_array" is displayed, indicating logon failure. how can this problem be changed?
$ Account = $ _ POST ["account"]; $ password = $ _ POST ["password"]; $ res = mysql_query ("select * from z_register where z_account = '". $ account. "'and z_password = '". $ password. "'"); print_r ($ res); if ($ result = mysql_fetch_array ($ res) {mysql_query ("update z_register set z_login_count = z_login_count + 1 where z_account = '". $ account. "'"); $ _ SESSION ['account'] = $ account; $ _ SESSION ['username'] = $ result ['Z _ name']. $ result ['Z _ title'] ; // $ _ SESSION ['login _ count'] = $ result ['Z _ login_count ']; refresh_page (". /other/list. php ");} else {exit ('logon failed! Click here to return and try again
');}
Reply to discussion (solution)
If the record is not met, the login fails. if you say that ie is correct, I suspect that your ie has a problem.
There may also be encoding problems that cause no query results
If the record is not met, the login fails. if you say that ie is correct, I suspect that your ie has a problem.
It may be because of the encoding problem that the query results could not be found. I found the problem because the password was not passed in. But there is still a problem. if I use md5 encryption, that is, $ _ password = md5 ($ _ post ["password"]), I found that chrome can log on, but ie failed. I output the md5-encrypted password. chrome is different from ie. how can this problem be solved?
Your ie is poisoned.
Your ie is poisoned. it seems that the password value has not been passed in.