please can anyone out there help me! i'm trying to create a website that the users can log in and edit/update/delete/insert their records (like a penpals or dating site). i've added an authentication script which uses sessions to authenticate users. the username and passwords are stored in a table in a database which also contains the ID (primary key), email address, and other personal details (nickname, address etc). so far, i've been able to create a member area that will have links to make them edit their profiles, but how then do i use the session to identify their specific id in the database, so that they can only edit their own profile? ie if i was to put a link like
<a href="edit.php?id=$id">edit profile</a> how do i get the id variable out of the database, so that it only gets the id of the person that is logged in, making sure he/she only edits his/her profile?
Please help, as i'm really confused as to how to do this.