mindlessrobot Posted December 4, 2011 Share Posted December 4, 2011 I, for some unknown reason, decided to attempt to build my first social networking website for my senior project. I am sort of a dumb dumb when it comes to PHP. For what I am currently working on now I need to display "members" that go to the same "school" and start in the same "semester" according to whomever is currently logged in. I understand $_SESSION['userid'] = mysql_insert_id(); is tracking the current user, but how would I track other information attached to that current user. The "school" and "semester" are tracked within tables outside of the "user" table. Any help at all would be awesome. If you need anymore information let me know. Thanks a trizillion. Quote Link to comment https://forums.phpfreaks.com/topic/252463-need-_session-help-for-final/ Share on other sites More sharing options...
sunfighter Posted December 5, 2011 Share Posted December 5, 2011 $_SESSION only holds the information you put into it. To find out "members" that go to the same "school" as the current user and/or the people that started in the same "semester" as he/she, you have to query your database. And mysql_insert_id(); retrieves the ID generated for an AUTO_INCREMENT column by the previous query (usually INSERT). If your really a dumb dumb when it comes to PHP my suggestion is to cram very hard cause there is no way your going to get a social networking website running without it. Quote Link to comment https://forums.phpfreaks.com/topic/252463-need-_session-help-for-final/#findComment-1294496 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.