What is wrong with this PHP MySQL Query? -
i keep getting mysql error when using query:
$query = "insert subscribe (`firstname`,`lastname`,`username`,`password`,`email`,`expiration`,`status`,`policy`,`dlpolicy`,`extension`,`key`,`temp`) values ('".mysql_real_escape_string($fname)."','".mysql_real_escape_string($lname)."','".mysql_real_escape_string($user)."', '".mysql_real_escape_string($pass)."', '".mysql_real_escape_string($email)."','".$exp."', '".$userkey."', '3', '1', '.exe,.mp3,.torrent,.mov,.zip','0', '0'";
here error:
you have error in sql syntax; check manual corresponds mysql server version right syntax use near '' @ line 1
any ideas?
looks forgot closing )
values
.
this should work:
$query = "insert subscribe (`firstname`,`lastname`,`username`,`password`,`email`,`expiration`,`status`,`policy`,`dlpolicy`,`extension`,`key`,`temp`) values ('".mysql_real_escape_string($fname)."','".mysql_real_escape_string($lname)."','".mysql_real_escape_string($user)."', '".mysql_real_escape_string($pass)."', '".mysql_real_escape_string($email)."','".$exp."', '".$userkey."', '3', '1', '.exe,.mp3,.torrent,.mov,.zip','0', '0')";
Comments
Post a Comment