Retreiving a session varible and querying db if found redirect user.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • underground
    New Member
    • Sep 2006
    • 41

    Retreiving a session varible and querying db if found redirect user.

    I have a question more so I need a example of how to achieve this type of php function. I don't have any script I been playing around with the idea in my head and need some expert opinion as well recommendation.

    In this senerio I am using session's to control access to specific pages.
    The main page is a control panal were the user can create account are a profile.
    kinda like myspace.

    I only want to allow them to create one account so the user name is passed
    to the member and picture tables. I want to use this as the primary key to keep the user from creating more that one account with the same name..

    Now my question is how can I prevent the user from accessing the account set page but rather display existing account info and allow them to update or make changes to the member and picture tables...
    =============== =============== =============== =============
    scenerio:
    retreive session name==>querydb= =>display result based on query==>
    results: user name not found ===show profile set up page=>
    results:user name found==display edit page=>
Working...