You are missing quotes around the string columns in your query.
mysql_query("INSERT INTO forum_sub_cats (sub_cat_name, forum_cat_name, desc) VALUES ('$name', '$cat_name', '$desc')") or die(mysql_error());
Note that you may also need to use mysql_real_escape_string() if you use single quotes in your texts.
pritaeas
Posting Expert
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875