PHP local modification test OK, it won't work on the server. which expert can help me?
Source: Internet
Author: User
PHP local modification test OK, it will not work on the server. who can help me? The local test is acceptable, that is, it cannot be performed on the server, and there is no problem with the received value and connection. The following is the code written to the database. I think it is an error, but I cannot find the cause of the error. could you please take a look? Thank you ---------- split line ---------------- & lt ;? Phprequire_once (& quo PHP local modification test OK, it will not work on the server. who can help me?
The local test is acceptable, that is, it cannot be performed on the server, and there is no problem with the received value and connection. The following is the code written to the database. I think it is an error, but I cannot find the cause of the error. please take a look. thank you.
---------- Split line ----------------
Require_once ("../conn. inc. php"); // contains the database connection file
// Receives the form value
$ NetsId = $ _ GET ['id'];
// If ($ netsId = NULL ){
// $ NetsId = $ _ GET ['id'];
//} Else
If ($ _ GET ['id'] = NULL ){
Echo 'no modification information! ';
}
// Echo $ netsId;
$ User_name = $ _ POST ["user_name"];
$ User_psw = $ _ POST ["user_psw"];
$ User_ip = $ _ POST ["user_ip"];
$ Net_name = $ _ POST ["net_name"];
Echo $ net_name;
$ Net_url = $ _ POST ["net_url"];
$ Net_type = $ _ POST ["net_type"];
$ Province = $ _ POST ["Province"];
$ City = $ _ POST ['city'];
$ Net_content = $ _ POST ["net_content"];
// Pre-defined variable
$ Net_num = $ _ POST ["net_num"];
$ Net_in = $ _ POST ["net_in"];
$ Net_out = $ _ POST ["net_out"];
$ Net_ OK = $ _ POST ["net_ OK"];
$ Net_recom = $ _ POST ["net_recom"];
// System Time difference: 8 hours
Date_default_timezone_set ('Asia/Chongqing ');
$ Now = getdate (time ());
$ Cur_wday = $ now ['wday'];
$ Date = date ("Y-m-d H: I: s $ cweekday [$ cur_wday]");
$ Net_submit_time = date ("Y-m-d H: I: s ");
$ Last_time = $ _ POST ["last_time"];
If ($ City = NULL)
{
$ City = $ _ POST ['citydefault'];
Mysql_query ($ SQL); // pass the Operation statement to the mysql database
Echo "the website has been modified! ";
Echo 'You can also return to the home page or ';
Echo 'click to return ';
// Echo 'The modified ID' is '. $ netsId .'';
?>
------ Solution --------------------
Do not check function return values?
------ Solution --------------------
Send the error message.
------ Solution --------------------
Discussion
Send the error message.
------ Solution --------------------
Discussion
Reference:
Reference:
Send the error message.
Yes. send the error prompt. it is simple and quick.
Show this sentence, do not know what it means ......
The information is not successfully written into the database! You have an error in your SQL syntax; check the manual that corresponds to your MySQL server ve ......
------ Solution --------------------
Modify the SQL statement to this effect.
Id = {$ netsId }";
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.