Insert session value for userID into 2nd table
I need help to understand how, procedure and the php code to Insert the session value for the logged in userID (and userEmail) into a second table field. The second table has additional information that the user will create after hitting the submit button.
I have created MySQL db tables with the InnoDB engine and am using PHP.
Example:
Tbl_parents -userSID, userEmail
Tbl_children -kidSID, userSID, userEmail
In tbl_children, userSID is FK to tbl_parents userSID, and is set to cascade from tbl_parents. I believe that the log in page created with the WebAssist Wizard starts a session for the login user. I am assuming that when setting up eCart (not done yet) a similar code would input the userID into the order table.
In my case, the parent has logged in with their account information, redirected to their profile page which pulls up their information (record) and then goes by link to a second profile page that allows them to set up the children’s accounts in the second table with unique ID’s. I am sure that this seems simple but I am new to the process. Thank you for your assistance with this.