Jump to content
Larry Ullman's Book Forums

Recommended Posts

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

  • 1 year later...

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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...