I would like to insert a sequencial item number when everytime the user creates an exam. 
everytime he creates an exam it restarts to 1. I extremely need your help, people. More power. :) 

here is my code:

```
$examid = $_SESSION['examid'];
$itemnum = 1;

$sql = mysql_query("INSERT INTO exam_questions (question_description, question_type, question_exam_id) VALUES ('$question', '$type', '$examid')")or die(mysql_error());
$lastinsertid = mysql_insert_id();
mysql_query("UPDATE exam_questions SET question_set_id='<??????????>' WHERE question_id='$lastinsertid' LIMIT 1")or die(mysql_error());

```