[Solved]having a parse error on a function
Posted: Wed Mar 30, 2005 6:46 pm
Hye
I'm trying a new script which should build a mini forum
I'm having a parse error on a line which should return the id of the last record inserted. Instead it has a parse error. The code is "$topic_id=mysql_insert_id():" which it has an error on.
Can anyone give me a hand????
The script
Hope sombody can help??
I'm trying a new script which should build a mini forum
I'm having a parse error on a line which should return the id of the last record inserted. Instead it has a parse error. The code is "$topic_id=mysql_insert_id():" which it has an error on.
Can anyone give me a hand????
The script
Code: Select all
$add_topic = ("insert into forum_topics values ('','$topic_title',now(),'$topic_owner')");
mysql_query($add_topic,$connect) or die(mysql_error());
$topic_id=mysql_insert_id():
$add_post= ("INSERT INTO forum_posts values ('','$topic_id','$post_text',now(),'$topic_owner')");
mysql_query($add_post,$connect) or die(mysql_error());
$msg = "<p>The <strong>$topic_title</strong> topic has been created.</p>";
?>