#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    1
    Rep Power
    0

    clear GET & POST value on refresh page


    Hi everyone.

    when I fill a form and then submit it , it works right
    [address?value=sth]

    But I wanna if then form refreshed by user, address changes to
    [address] without POST & GET

    Any advice is most welcome!
  2. #2
  3. No Profile Picture
    The one who gets it done
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Location
    Madison, WI
    Posts
    395
    Rep Power
    13
    huh?
  4. #3
  5. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2003
    Location
    New Hampshire, USA
    Posts
    550
    Rep Power
    12
    I second that.....huh?
  6. #4
  7. php'er
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2002
    Location
    H-town
    Posts
    47
    Rep Power
    12

    your answer, i hope


    what it sounds like you want to do is have them submit a form, either GET or POST, and process the data, but you don't want them to hit refresh and submit the form mulitple times, right?

    to fix this, here's what you'll have to do.

    when they submit the form, go ahead and process their form like normal, whether that's talking to mysql or whatever. then, before you echo anything, you call a header() function

    header("Location: mypage.php");

    where "mypage.php" is the name of the file you want them to go to. this'll send 'em to that page automatically, and when they hit refresh on the new page, it won't resubmit the form.

    hope this helps,
    Adam

    .: bus: www.inversiondesigns.com
    .: me: awulf.inversiondesigns.com

IMN logo majestic logo threadwatch logo seochat tools logo