i use the kinda of thing your on about on my site the user joins my site and they are automattically assigned an ID No
to do it simply on your html form and simply add this to the top of your html form:
<input type="hidden" name="userid" value="NULL">
then in your database that all the other info goes into open that table add a new field called "userid" make it "INT" "NOT NULL" and "AUTO INCREMENT"
now in the php file assuming you use 1 to add the data to your database find the bt where it enters all the info in and at the beggining of teh INSERT command before your first variable and add '$userid',
hopefully this should do the job