Hello people I have created a Userid for my site so that when the user registers they can change their username and other details, and the system will always remember their userid. At the moment I have made my system to ‘auto-increment’ the userid in the mysql database, so that each new user is assigned a ‘permanent’ userid. I want to make this userid available to the session so that when the user users some features of my site, their userid is logged along with their comments, for example. How can I get this userid to be stored inside the session? Any help would be appreciated. Many thanks
registration: validate and insert data to database table if you want to register the userID on session, just after registration, you can get that userID using the "mysyl_insert_id()" that returns the newly inserted ID Login: validate and user and password include userid in your query select userID, username, password from members where username = $username ... then include userID to your session..