Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New Coder
    Join Date
    Feb 2009
    Posts
    22
    Thanks
    5
    Thanked 0 Times in 0 Posts

    create individual member profiles???

    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
    Last edited by maroccano1; 02-19-2009 at 08:45 PM.

  • #2
    Regular Coder ohgod's Avatar
    Join Date
    Jun 2008
    Location
    Ohio
    Posts
    579
    Thanks
    6
    Thanked 69 Times in 69 Posts
    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

  • #3
    New Coder
    Join Date
    Feb 2009
    Posts
    22
    Thanks
    5
    Thanked 0 Times in 0 Posts
    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!

  • #4
    Regular Coder ohgod's Avatar
    Join Date
    Jun 2008
    Location
    Ohio
    Posts
    579
    Thanks
    6
    Thanked 69 Times in 69 Posts
    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.

  • #5
    New Coder
    Join Date
    Feb 2009
    Posts
    22
    Thanks
    5
    Thanked 0 Times in 0 Posts
    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.

  • #6
    Regular Coder ohgod's Avatar
    Join Date
    Jun 2008
    Location
    Ohio
    Posts
    579
    Thanks
    6
    Thanked 69 Times in 69 Posts
    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.

  • Users who have thanked ohgod for this post:

    maroccano1 (02-19-2009)

  • #7
    New Coder
    Join Date
    Feb 2009
    Posts
    22
    Thanks
    5
    Thanked 0 Times in 0 Posts
    ok i think i understand, but when you first register a user how do you generate the url?

  • #8
    New Coder
    Join Date
    Feb 2009
    Posts
    22
    Thanks
    5
    Thanked 0 Times in 0 Posts
    I've got it, the pennys droped
    thanks for your help bro

  • #9
    New Coder
    Join Date
    Mar 2009
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    Last edited by mfriedman24; 03-14-2009 at 09:03 AM.

  • #10
    Regular Coder sea4me's Avatar
    Join Date
    Jan 2009
    Location
    Damn, I don't know...
    Posts
    390
    Thanks
    11
    Thanked 28 Times in 27 Posts
    Quote Originally Posted by mfriedman24 View Post
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •