Data cannot be deleted. Prompt deleted successfully, Khan

Source: Internet
Author: User
In this way, data cannot be deleted. Prompt that the deletion is successful. Khan PHPcode & lt ;? Phpsession_start (); if ($ _ SESSION [name] ==& quot; & quot;) {exit () ;}include & quot; img/ddddd. php & quot; $ ming =$ _ SESS cannot delete data. Prompt deleted successfully, Khan
PHP code
  
  



------ Solution --------------------
$ Shan and $ ming both get the value?

Is there this data in the database?
------ Solution --------------------
Is the database code correct?
Discussion

Forget it. forget it by modifying the delete id. I have solved this problem. There is another problem. All of my UTF-8 encoded utf8_general_ci web pages to the database, and database connections are utf-8. but the man who writes data into MYSQL still does not know what is going on.

------ Solution --------------------
1. $ SQL = mysql_query ("delete from 'readuser' where 'falsename' = '$ Sha' and 'username' =' $ Ming '");
If ($ SQL) {// it only indicates that the SQL command is not correct and does not indicate that the deletion is successful.

2. forget it. forget it by modifying or deleting the id. I have solved this problem.
Not solved! You just avoided the problem of querying by content.

3. all of my codes are unified. the utf8_general_ci webpage goes to the database, and the database connection is utf-8. However, the man who writes data to MYSQL is still garbled.
The data before modifying the character set is still garbled.
Mysql_query ("set names utf8"); only tells mysql that the subsequent data is UTF-8 encoded, but what character set is actually used, that day only knows

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.