One of the scripts I'm writing saves an article into a database based on the information inputted by the user. The ID of the article is set up AUTO_INCREMENT.
However, the next task of the script is to add chapters to this specific article, and for that, I need the article ID. Is there any way of fetching this? I mean, since it's set by AUTO_INCREMENT, I have no idea what it is, right?
Thanks in advance !
So this is after you put it in the db you can use
$db = mysql_connect("", "", "");
$result = mysql_query("INSERT...");
$nextid = mysql_insert_id($db);