This is the thing i need to work $sql="INSERT INTO forum_categorys(catname, desc, ffname) VALUES ('$categorys', '$descc', '$categorys')"; $result=mysql_query($sql); Code (markup): But this one works $sql="INSERT INTO forum_categorys(catname, ffname) VALUES ('$categorys', '$categorys')"; $result=mysql_query($sql); Code (markup): Any help rep+
Execute this code and write here what error it shows: $sql="INSERT INTO forum_categorys(catname, desc, ffname) VALUES ('$categorys', '$descc', '$categorys')"; $result=mysql_query($sql) or die(mysql_error); PHP:
it prints 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, ffname) VALUES ('yes', 'yes', 'yes')' at line 1 Code (markup): BTW its mysql_error()
Can you write here "forum_categorys" table structure? And write here what the variable $sql prints ( echo($sql); ).
Or try this: $sql="INSERT INTO forum_categorys (`catname`, `desc`, `ffname`) VALUES ('$categorys', '$descc', '$categorys')"; $result=mysql_query($sql) or die(mysql_error); PHP: