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 '-type) VALUES('1','

$Query = mysql_query("INSERT INTO wp_posts(post_author,post_content,post_title,post_status,comment_status,ping_status,post_name,post_parent,menu_order,post-type)            VALUES('1','$HTML_Content','$Page_Name','published','closed','closed','Contact-Me',0,0,'page')");

i think your column name is post_type not post-type.

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.