Is this clean?

admin

Administrator
Staff member
In my small trouble ticket system, I wanna give my users a tracking ID so they can just type it in and I can grab it from the database. I figure I'll just use the primary key and use this code:

//insert data into request table
$query="INSERT INTO request VALUES(NULL, NULL, '$request','$type',1,'$NewID')";
mysql_query($query) or DIE("Insert failed!");

$TrackingID=mysql_insert_id(); //a tracking id to give to the user.

then just echo out $TrackingID to the user after the form has been submitted.

Does that sound like a clean solution?

Thanx
 
Back
Top