Results 1 to 7 of 7

Thread: dynamic profile display

  1. #1
    Join Date
    Mar 2009
    Location
    NJ, USA
    Posts
    32
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default dynamic profile display

    Hello Dynamic Drive!

    I am creating a member website which can display profiles to the public. I have set up a login and control panel where the member can edit the content of their profile. Now I am trying to create a search (simple list with bullets form) and profile display. As I understand it, when the user selects a member from the list, they can be brought to the profile page with the members information. What If I want the user profile to be several different pages? How would I hold on to the information called from the MySQL while the user looks at several different pages?

    If someone has an idea or can put me in the right direction It would be very relieving. I will post back here if I have any developments.
    Last edited by AdrielGreene; 05-07-2009 at 08:54 AM.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Do you mean you want many pages for each user, or pagination? If you were to do pagination, then set a session, and break it when they're off search.
    Jeremy | jfein.net

  3. The Following User Says Thank You to Nile For This Useful Post:

    AdrielGreene (04-29-2009)

  4. #3
    Join Date
    Mar 2009
    Location
    NJ, USA
    Posts
    32
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the advice Nile!

    I want to have a search page which queries the members, that seems easy enough. I am confused about having 5 different pages associated with that member once you select their profile from the search list. I'll check into setting sessions for the public; I thought that was only for logged in members. I am just picking PHP up so your help sending me in the correct direction is wonderful.

    I'll look into sessions right away and see what I can dig up.

  5. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Sessions are for any body that visit the site. I mean the set a session with the search query, that way you don't have to send a get/post variable with the pagination.
    Jeremy | jfein.net

  6. The Following User Says Thank You to Nile For This Useful Post:

    AdrielGreene (05-01-2009)

  7. #5
    Join Date
    Apr 2009
    Location
    India
    Posts
    41
    Thanks
    0
    Thanked 4 Times in 4 Posts

  8. The Following User Says Thank You to amutha For This Useful Post:

    AdrielGreene (05-01-2009)

  9. #6
    Join Date
    Mar 2009
    Location
    NJ, USA
    Posts
    32
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Ok, now I understand. Thank you for the link Amutha. I have developed pagination for my search. It displays the members of my site properly, and will make multiple pages in order of the case selected. It prints like this:

    Last Name-First Name-Date-Registered--State-Profile
    Arguile-----Joe--------April 06, 2009----NJ----joey
    Smith ------Kathy-----April 26, 2009----NY---K-bomb

    In the Profile column I am trying to place links to their respective profiles, ideally in the form of a hyper link(but functionality comes first). I am not very familiar with sessions but from what I can gather from Nile I need to put code like this on top of my pagination code:

    session_destroy();
    session_start();

    I'll add an IF statement so the destroy statement doesn't output an error.

    Right now the profile column is in the form of hyperlinks which direct to sub-domains like http://joey.website.com. Sub-domains would be nice to implement but for now I'm just stuck on the session.

    Is there a way to have the session information call data from a MySQL DB and redirect with the hyper-link which then fills the profile pages? Should I be looking at forms instead? Am I just looking at this from a completely incorrect perspective? I feel like I dug myself into a pit of web-architecture confusion.

  10. #7
    Join Date
    Mar 2009
    Location
    NJ, USA
    Posts
    32
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    I got it! The Paginated search gives buttons for different .php files. The .php files are named after the field Profile_ID in my database. they are created when the member makes his/her account. They then fill the session variables where $_POST equals the Profile_ID field in my database. These display in Profile.php

    For example:
    I click on Danny whose Profile_ID is "DanDaMan". The link in the paginated search brings me to "DanDaMan.php". DanDaMan.php queries SELECT profile fields WHERE DanDaMan(name of current file) = Profile_ID. It then redirects the user to Profile.php. Profile.php fills in with $_SESSION from DanDaMan.php

    Thank you both very much for the aid, it was much needed and very productive.

Bookmarks

Posting Permissions

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