I just cannot find what's wrong with this piece of code, The database table and field names is correct I just don't get it.
$query="INSERT INTO ads (name,cat,desc,posted,user,active) VALUES ('$title','$cat','$desc','$date','$name','1')";
mysql_query($query) or die(mysql_error()) ;
The output:
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 'desc,posted,user,active) VALUES ('weqwadas','4','asdasdasd','15-08-09','dean',1)' at line 1
Colinc, your a genius that solved my problem!
$query="INSERT INTO ads (name,cat,desc,posted,user,active) VALUES ('$title','$cat','$desc','$date','$name','1')";
mysql_query($query) or die(mysql_error()) ;
The output:
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 'desc,posted,user,active) VALUES ('weqwadas','4','asdasdasd','15-08-09','dean',1)' at line 1
Colinc, your a genius that solved my problem!