The code of the video tutorial is as follows, the function is to click Edit to select the database id= "currently select the ID of the comment and then edit its contents", the database ID is set auto_increment, the video tutorial can easily get an array of current comments, I do not get. In $sql= "select * from ' feedback ' where ' id ' = '". $_get[' id ']. "'"; Front plus echo Display as SELECT * from ' feedback ' where ' id ' = ' Why can't I get the ID of the current item or the wrong side of the code, and beg you to help!
Reply to discussion (solution)
Do you have this query string on your URL? id=?
$sql = "SELECT * from ' feedback ' where ' id ' =". $_get[' id '];
ID queries do not require single quotation marks.
if (!empty ($_get[' id ')) {
//
}
When $_get[' ID '] is not equal to NULL, it will continue to execute,
Unless your $_get[' ID ' is a null value, Var_dump ($_get[' id ')) look.
Thank you for the first floor. The reason is that the ID is empty after adding href= "edit.php?id=" to the URL, the array is finally successfully obtained. Thanks again!