...

View Full Version : create individual member profiles???



maroccano1
02-19-2009, 08:43 PM
i have been learning php for my 3rd year university project, i know the basics, how to register a user, log in and out, however i would like each user to have their own profile pages when they register. I understand that the page must be linked using each members unique name or id but do not know how to implement it? any help would be greatly appriceated.

for example: http://www.codingforums.com/member.php?u=72370

ohgod
02-19-2009, 08:47 PM
assuming you have a mysql backend: every user would have a unique id and all the fields you'd like for their personal info.

make a page that will display these fields. have php populate the fields based on a mysql query that pulls that info after you give it a user id.


per the link above, http://www.codingforums.com/member.php?u=72370

see the u=72370? that would be an id

maroccano1
02-19-2009, 09:07 PM
i forgot to mention that i was using mysqli. I understand the idea that each member is linked by their unqiue id "u=72370", but how do you establish the link, if you run a query based on the session id then only that user can see the pages details, i would like each profile page to be available for view by any user. I am very confused!

ohgod
02-19-2009, 09:09 PM
i didn't say you had to use a session id... i said you had to give it an id to work with.

all you're using the id for is to pull the user specific profile information.



you would use the session id type handling to decide whether or not the user should be able to edit that information.

maroccano1
02-19-2009, 09:17 PM
bare with me i really am new this, but how can i give it an id?
I know it will be the same id as the user, but how do i declare it in php?
i have created a template and the query for the information to be displayed in?
thanks.

ohgod
02-19-2009, 09:25 PM
well, this site uses a get string like in the link above. basically, wherever on your site you want people to be able to access the profile you need to have the id referenced. like on this site the names are links to the profile page with the id in a get string.

maroccano1
02-19-2009, 09:41 PM
ok i think i understand, but when you first register a user how do you generate the url?

maroccano1
02-19-2009, 10:05 PM
I've got it, the pennys droped:thumbsup:
thanks for your help bro

mfriedman24
03-14-2009, 08:59 AM
hi, i'm making a similar website and i created the registration, login, and logout forms and when i test it i have three made up test users and for some reason whenever i log in with any of them my profile.php?id=... page only shows the first record's information, not what user logged in...how do i fix this?? thanks in advance!

ps i'm using dreamweaver cs4

sea4me
03-14-2009, 11:17 PM
hi, i'm making a similar website and i created the registration, login, and logout forms and when i test it i have three made up test users and for some reason whenever i log in with any of them my profile.php?id=... page only shows the first record's information, not what user logged in...how do i fix this?? thanks in advance!

ps i'm using dreamweaver cs4

It's better to start a new tread and post some code of profile.php



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum