username and password tracking

Discussion in 'PHP' started by tirso, Jul 18, 2008.

  1. #1
    HI to all

    I am a newbie with php, In my page there is a form the the user can see it but if they want to fill up this form then they need to login first. My question is how can I track that the user is already login before they might fill-up the form. I am thinking that I need to preserve a variable wich handle the value if the user succesfully login. The value of this variable assigned during the verification from the database. I am not sure if this is the correct way and honestly speaking this is only my idea and I don't know how to do this. Please guide me and give me some help.

    Thanks in advance

    Tirso
     
    tirso, Jul 18, 2008 IP
  2. php-lover

    php-lover Active Member

    Messages:
    261
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    58
    #2
    You need to know about how to use session variable in PHP.

    Session is the right way to track user during their visit your site.
     
    php-lover, Jul 18, 2008 IP
  3. Agent_Smith

    Agent_Smith Well-Known Member

    Messages:
    890
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    145
    #3
    Agent_Smith, Jul 18, 2008 IP
  4. mokimofiki

    mokimofiki Well-Known Member

    Messages:
    444
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #4
    mokimofiki, Jul 18, 2008 IP