here's some sample code:
[perl]
use dbi;
# connect to database
&openDatabase;
$sqlquery = $dbh->prepare (qq{INSERT INTO table (var1,var2,var3,var4,var5) VALUES ('$var1','$var2','$var3','$var4','$var5') });
$sqlquery->execute();
$sqlquery->finish();
&closeDatabase;
[/perl]
I've tried also using
[perl]
$var2 = $dbh-> quote($var2); [/perl]
but that doesn't work either. I keep getting a 'syntax error ' on line X where X is the line where the $sqlquery variable in the script, and then a snippet of the html I was trying to insert.
Is the problem that I need to url encode the html? Or...? Thanks.