$sql="insert into some_table (".stripslashes(mysql_escape_string($your_var)).");";
Regards, Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS ----- Original Message ----- From: "Jason Rennie" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, November 29, 2001 2:12 PM Subject: [PHP] Quoting strings > Hi all, > > I have a fnction that needs to quote a strings in php to make them easy to > stick into an mysql db. > > I need to do basically "$msg", which is easy enough, but I would like to > not quote strings that are already quoted and also escape any single or > double quotes in the string. > > IS there a regex to do this that anybody knows of, or a php function that > i;ve missed ? > > Ideas anybody ? > > Thanks in advance > > Jason > > -- > Hofstadter's Law : "It always takes longer than you expect, even when you > take Hofstadter's Law into account." > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]