MySQL-Tabellen

If you want to transfer data to a MySQL database within a PHP script while creating a website, you should escape quotation marks in the data before transferring it.

This can be done for single and double quotation marks, for example, with:

$string = str_replace('"','\"',$string);
$string = str_replace("'","\'",$string);

... back to the blog