I have stores a unique session id in session when user logged in using session_regenerate_id() funciton . Every time user gets loged in in my website he will get a fresh session id.
now i want to save some of his data in a db table. I want to know how should i store data so that the new table gets foreign key from the user id of main table. Because i want to relate that information with the user id that is stored in main table. I dont want to store main table ID column in session as user_id because of security. Please all you big developers suggest me a good way in core PHP instead of frameworks.
Developers Will easily understand what i want to ask . I am a bit new :)
THANKS so much Faysal