I'm trying to insert a string into the database , but when it contains single quote('), the query becomes invalid.
$set_content=$_POST['content'];
$result = pg_query($db,"INSERT INTO programmes(title,picture,content) VALUES('$set_title','$pic_path','$set_content');");