[HELP] Save Values Inside Browser?

Discussion in 'PHP' started by farhan91, Sep 23, 2010.

  1. #1
    Hello, I just had a question. Is there a way to save what have previously been posted inside the browser somehow? Like what I'm trying to do it make a text box and a button, and every time you type something in the text box and click the button, I want what was types to be saved inside a variable. So lets say I typed dog and clicked the button, it would save that in a variable. Then after if I type cat and click the button, I want the dog to be saved along with the cat inside a variable/array.

    If anyone knows, please help.

    Thanks in advance. :)
     
    farhan91, Sep 23, 2010 IP
  2. lowridertj

    lowridertj Well-Known Member

    Messages:
    2,882
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    195
    #2
    can set cookies, or store the data like

    if($first_text_area){
    $var = $_POST['first_text_area'];
    }

    if($second_text_area){
    $vartwo = $_POST['second_text_area'];
    }

    etc..

    However you will have to call for it each time so it carry's on the variable.
     
    lowridertj, Sep 23, 2010 IP
  3. farhan91

    farhan91 Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Perfect, that helped and I figured out the login. Thanks for your help :)
     
    farhan91, Sep 23, 2010 IP
  4. lowridertj

    lowridertj Well-Known Member

    Messages:
    2,882
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    195
    #4
    no problem..
     
    lowridertj, Sep 23, 2010 IP