Jump to content
Larry Ullman's Book Forums

Slashes In My Added Pages


Recommended Posts

I am using

if (!empty($_POST['title'])) {

$t = mysqli_real_escape_string($dbc, strip_tags($_POST['title']));

} else {

$add_page_errors['title'] = 'Please enter the title!';

}

This code from the book but when I add a new page and use a word like don't it ends up looking like don/'t. Is this because of the mysqli_real_escape_string because I if build something similar for a client I don't won't that to show up but I would like for it to still be safe. Thanks for you help with.

Link to comment
Share on other sites

 Share

×
×
  • Create New...