What is the best way to carry an auto incremented ID from one form to another?
I have 3 tables (users, residences, and users_residences). I want a user to register, be added to the users table, be redirected to a form to create a residence which will add a row to the residence table and simultaneously add the the residence tabe row's id and the users table row's id to the users_residences table.
I have been playing around with uri segments but can't think of a way to store (or call) the just added user's ID for use in the second form.
I could probably use sessions to store an session id in the users table, then find the row ID from that, but it seems pretty hacky.
I am quite new to programming so feel free to tell me that I fail, but at least point me in the direction of where I can learn some of these concepts.
Thanks
Al