Insert error in mysql/php

vidhyardhi

New Member
I have got this function:\[code\] public static function insert_user($user){ $con = mysql_connect("localhost","root","") or die(mysql_error()); mysql_select_db("speakom",$con) or die(mysql_error()); mysql_query("INSERT INTO user (user_ip,user_name,full_name,email_address,password,gender,birthday,banned,role,country) VALUES('".$user->ip."','".$user->name."','".$user->full_name."','".$user->email."','".$user->password."',".$user->gender.",'".$user->birthday."',".$user->banned.",".$user->role.",'".$user->country."'") or die(mysql_error()); mysql_close($con);}\[/code\]And I get this error:\[quote\] 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 '' at line 2\[/quote\]Where does the error point to ? how do I know where the error is?
 
Back
Top