0

Well, I am making a blog system, but I have a question.

For example I will use this code

$contents = $_POST['contents'];
$conn->query( "INSERT INTO `posts`(`content`) VALUES ('{$contents}')" );

What if the $contents contains ', This will cause an error.

So is there other way to upload text file to database skipping this error?

Slavi
  • 576
  • 1
  • 3
  • 18

0 Answers0