Jump to content

MySQL insert - problems with quotes ('")


RLJ

Recommended Posts

Hi all,

 

I use a MySQL insert query of the following form:

<?php
$insert1= mysql_query   ("INSERT INTO tablename (H1, H2, H3) VALUES '$V1','$V2','$V3')");
?>

 

However, I encounter problems when $V1, $V2 or $V3 contain certain symbols, such as quotes ("'). What is the best way to avoid this?

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/229150-mysql-insert-problems-with-quotes/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.