why i always get error in hostgator when try to update this ga field in database, error happen when insert this code in textarea
_gaq.push(['_setCustomVar',1, 'Status', 'Logged In']);
_gaq.push(['_trackEvent', 'Custom', 'PageLoad', 'Setting Logged In State',0,true]);
<textarea name="ga"></textarea>
$name = $_POST['name'];
$ga = trim($_POST['ga']);
$req = "UPDATE `con` SET `name` = '".$name."', `ga` = '".$ga."'");
if (mysqli_query($con, $req)) {
echo "success"
}
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '_setCustomVar',1, 'Status', 'Logged In']); _gaq.push(['_trackEvent', 'Custom', ' at line 1
if i remove ga
= '".$ga."' my database update but if add this code it give error i have hostgator and it work good in localhost
type of ga in database is text.