Hi
I wrote this code and I hope that you can tell me what is wrong with it .!

$sql = "INSERT INTO offers (title,description,location,type,status,img,real,username) VALUES('".$title."','".$description."','".$location."','".$type."','".$status."','".$img."','".$real."','".$username."')";
$query = mysql_query($sql) or die(mysql_error());

The error :

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 'real,username) VALUES('y','qq
','aa','test1','test2','t','test3','core')' at line 1

Thanks ... problem solved
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.