display the certain data

Discussion in 'PHP' started by kumar84, Jul 3, 2007.

  1. #1
    hai friends

    I have a user login page, with the help of username and password iam entering into my login. After ending into my login page there are certain data's with user id all are displaying in my login page, This is what i have done

    Now i want to do is after entering in my login page for me only one data with the user id is want to display[ not all ]

    so when second user again entering into the login page for him the second data is want to display

    so when the third user entered means the third data is want to display

    i need the php code or sql query for this
     
    kumar84, Jul 3, 2007 IP
  2. tamilsoft

    tamilsoft Banned

    Messages:
    1,155
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try to use limit keyword on your query
     
    tamilsoft, Jul 4, 2007 IP
  3. Brewster

    Brewster Active Member

    Messages:
    489
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Hi

    Can you post any the code for your login page.

    It sounds like you are after a simple login system that shows each user their data - is that correct ?

    Brew
     
    Brewster, Jul 4, 2007 IP
  4. sarahk

    sarahk iTamer Staff

    Messages:
    28,897
    Likes Received:
    4,555
    Best Answers:
    123
    Trophy Points:
    665
    #4
    The code isn't that straightforward and it depends on the system you are using. Lots of people build their code into a CMS like Joomla so that all that user management is taken care of and they can concentrate on their business requirements. Others use a framework like cakephp which gives them a head start but doesn't include user authentication.

    I'm guessing, though, that you've started from scratch. I'd head over to www.phpclasses.org and pick up one of their scripts that has been coded to manage session duration, logging in, logging out etc. Then it's just a matter of using one of their functions to get the users id and build that into your queries.
     
    sarahk, Jul 4, 2007 IP