1. This website uses cookies. By continuing to use this website you are giving consent to cookies being used.
    For information on cookies and how you can disable them visit our Cookie Usage page.
    Dismiss Notice

PHP Creating a log in dashboard

Discussion in 'Web Development' started by Aristo, Jun 16, 2011.

  1. Aristo

    Aristo New Member

    Ok so i am still a nub first off)))
    i have been learning PHP for a short time. I know HTML just fine.
    But anyways i have build a website in dreamweaver CS5.5
    i build in with .PHP so i can connect it to MySQL for database what i am having trouble doing is creating the log in area/system if you will

    Every other web site has a login where you can register then once inside you are welcomed and can see your personal account information, edit it if needed, look at documents/ news/FAQ, communicate, order forms, etc

    I can make a simple page to be secured, but once you log in everyone sees the same page. i cant find out how to make it different for each user

    If anyone now of guides or tuts or has any advice that can help explain this system to me or can show me steps it would be great

    Thanks so much everyone...please help ))
     
  2. BoboBarlow

    BoboBarlow New Member

    My PHP/MySql is fairly rusty but I think the below might help.

    Is the individual ID that you are using to login as a user linked to any content that you would want to be displayed to the user? The way I would do it is by having a primary key (user_id for example) which links to a different table (profiles for example) where profiles contains the information that would be shown in the profile.

    You should then be able to use the user_id held in the session to query against the profiles table and bring back your results for that individual user.

    That's just off the top of my head, I would have to have a more detailed look at the PHP code and database tables you already have to be able to give you more of an insight.

    I hope this helps.
     
  3. BoboBarlow

    BoboBarlow New Member

    The link below may be of some use to you. It shows you how you can store your own variables in the session using the session_register function. You could pull the information from the database using the login information and store that in the session (I think).

    Hope this helps

    PHP: session_register - Manual