shanna Posted January 1, 2017 Share Posted January 1, 2017 i have a problem with edit_entry.php example.(page number 383) after i update blog, its still saying update both title and entry. if (!empty($_POST['title']) && !empty($_POST['entry'])) { $title=mysqli_real_escape_string($dbc, trim(strip_tags($_POST['title']))); $entry=mysqli_real_escape_string($dbc, trim(strip_tags($_POST['entry']))); Looks like If statement is not working there.. I need help! Thank you. Link to comment Share on other sites More sharing options...
Larry Posted January 2, 2017 Share Posted January 2, 2017 I'd check your HTML form to confirm you haven't made a mistake in creating the names for the form elements. 1 Link to comment Share on other sites More sharing options...
shanna Posted January 6, 2017 Author Share Posted January 6, 2017 I got it. Thank you. Link to comment Share on other sites More sharing options...
Larry Posted January 7, 2017 Share Posted January 7, 2017 Could you kindly post what the problem was so others may benefit? Thanks! Link to comment Share on other sites More sharing options...
Paco Posted June 12, 2018 Share Posted June 12, 2018 I have a question about edit_entry.php code. What has to be typed on the url for the browser to show the message "Could not retrieve the blog entry because..." in line 34 of the code? beacuse if I type an id that is not in the database, I don't get the message, I just get the form but with no text. Link to comment Share on other sites More sharing options...
Larry Posted June 13, 2018 Share Posted June 13, 2018 Ah! Sorry for the confusion, you may have found a bug. I would have thought I would have caught this! The conditional on line 22 only confirms that the query ran okay. It actually needs to confirm that one row was returned instead. So sorry about that! I'll get it fixed. Link to comment Share on other sites More sharing options...
Recommended Posts