//create and issue the first query
$add_topic_sql = "INSERT INTO forum_topics (topic_title, topic_create_time, topic_owner) VALUES ('$_POST[topic_title]',now(),'$_POST[topic_owner]')";
$add_topic_res = mysql_query($conn, $add_topic_sql)
or die(mysql_error($conn));
//get the id of the last query
$topic_id = mysql_insert_id($mysql);
Millsy013 0 Newbie Poster
phouse512 0 Junior Poster in Training
network18 15 Practically a Master Poster
Hummdis 5 Light Poster
network18 15 Practically a Master Poster
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.