php - pgsql string escape when inserting -


i new postgresql, trying insert html code data base text cant inserted such single quotes example. looking code me "trim" or allow allow characters inserted. have tried following code didnt work.

$title= $_post['title'];     $intro= $_post['intro'];     $content= $_post['content'];     $category= $_post['category'];     $sort_footer = 24;  //insert code     $stmt = $dbh->prepare("insert content(title, intro, content, category, sort_footer )      values ( :title, :intro , :content , :category ,:sort_footer ) ");      $stmt->bindparam(':title', $title);     $stmt->bindparam(':intro', $intro);     $stmt->bindparam(':content', $content);     $stmt->bindparam(':category', $category);     $stmt->bindparam(':sort_footer', $sort_footer);      $stmt->execute(); 


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -