When php reads data from the database, ie8 can obtain the data, and chrome, 360, ff, and other browsers cannot obtain the data.

Source: Internet
Author: User
Tags php mysql
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.