After the information is modified successfully, four error messages are displayed, which are displayed in rows 15th, 17, 25, and 26. Undefined variable number1 (PS: I found that I have been asking this question for a month ...... Shame)
The number of students cannot be less than the number of currently selected students. An error occurred while modifying the number column!"; Echo"
"; Exit;} else {$ query2 = mysql_query (" update $ jiaoshi_table set number = '$ number1 'Where id =' $ ID '"); $ query3 = mysql_query ("update $ jiaoshi_table set surplus = surplus-($ row [sn]-$ number1) where id = '$ ID '"); mysql_query ("set names 'gb2312 '"); $ result1 = mysql_query ($ query3 );}} else {$ query4 = mysql_query ("update $ jiaoshi_table set number = '$ number1 'Where id =' $ ID '"); $ query5 = mysql_query ("update $ jiaoshi_table set surplus = surplus + ($ number1-$ row [sn]) where id = '$ ID '"); mysql_query ("set names 'gb2312 '"); $ result2 = mysql_query ($ query5);} if ($ result = true) {echo"The topic has been modified!"; Echo"
"; Exit;} else {echo"
Modification error. please return and modify again
"; Echo"
"; Exit ;}?>
Reply to discussion (solution)
$ Number1 has no value. Where does $ number1 obtain the value.
$ Number1 has no value. Where does $ number1 obtain the value. Thanks. I suddenly found that I changed the variable name ...... Now.