Thanks for your help. This is as far as I got.
<PHP>
if (!mysql_select_db("helpdesk", $connection))
showerror();
$insertQuery = ("INSERT INTO call_logger VALUES (NULL, '$dept', '$log_creator', '$log_title', '$log_detail', '$log_sev', '$log_detail_ref', '$log_status', '$log_ip', NOW(),NULL,NULL,NULL)");
if ((@ ($insertQuery,
$connection))
&& @ mysql_affected_rows() == 1)
echo "The log number is ", mysql_insert_id() .
'<a href="test_page.php?log_id=lastid">Test</a>';
else
showerror();
}//if else empty()
?>
</PHP>
So I can get the value, but I don't know how to create the value seperately and include it in the link.
Thanks
Jon