Hello, I have a html file, and I want to insert it to Mysql db. For example, the content of html file, There are single quotes, double quotation marks etc... Is there any MySQL function to do the job? Thanks!
You could encode and decode: <html> <body> <p> <?php $enc = mysql_query("SELECT ENCODE('testing','')"); $str_enc = mysql_fetch_array($enc); $val_enc = $str_enc[0]; echo $val_enc."<br>\n"; $dec = mysql_query("SELECT DECODE('".$val_enc."','')"); $str_dec = mysql_fetch_array($dec); $val_dec = $str_dec[0]; echo $val_dec; ?> </p> </body> </html> Code (markup):