Its an insert function - meaning the function name is "insert" and you pass it a query. In a more basic form:
function Insert($query, $dupcheck = '')
{
$result = mysql_query($query);
if($result)
{
// query was a success - find the auto ID
return mysql_insert_id();
} // end if($result)
else
{
EmailError('Failed to execute query: ' . $query . "\n\n" . mysql_error());
return -1;
} // end else
} // end function Insert($query)
I've used this code in enough projects and I'm happy with it, but your mileage may vary. You will find "EmailError()" does not exist. You may wish to pull this function out or build your own. All EmailError() does is take 2 strings and builds an email message which gets sent to my email account. It describes the time, the script, the query, and the problem involved in an email and sends it to me. This allows me to keep track of any bugs that might crop up in relation to the query itself. But this is up to you to implement...
The insert function returns either a positive number which is the automatic insert ID if its and when its available. It'll return a negative number if there was a failure. All you do is when you're ready to insert something and you need the ID, you just call insert('[your insert query]') and you grab its return value. Test it to make sure it is a positive number and then you're good to go...