#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Sacramento
    Posts
    50
    Rep Power
    15
    Hi,

    I've been looking for a way to destroy "url variables" so that once a user submits to the db, they can't hit their "back" button and resubmit the data.

    Is there a good way to ensure this doesn't happen? Like clearing all the variables from the url?

    Thank you.
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    you can destroy a variable using unset() function.

    eg:
    unset($variablename);


    <<
    they can't hit their "back" button and resubmit the data.
    >>

    i think for this purpose you have 2-3 options.first option is that you can expire the previous page after updating the database.and redirect user to another 'thank you page'.that is what happening here in this discussion forum posting.so if user go back it will show an expired page.


    second option is that,make some database fields unique.and check wether that data is already their in the database or not .show an error message if the record is already exist in the database.



    ------------------
    SR -
    webshiju.com
    www.jobxyz.com-IT Career Portal
    ezipindia.com--WebStudio


    "The fear of the LORD is the beginning of knowledge..."
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Sacramento
    Posts
    50
    Rep Power
    15
    Can I have the page expire and if they go back to it, it can have a custom message:

    ie: "This page has exired, click here"

    Can you give me the name of the function to expire?

    Thank you very much!

Similar Threads

  1. Passing POST variables
    By rlorenzo in forum PHP Development
    Replies: 11
    Last Post: June 6th, 2004, 03:00 PM
  2. help with assigning variables, variable passing/ retrieval
    By pinkipodmini in forum PHP Development
    Replies: 0
    Last Post: February 13th, 2004, 10:40 PM
  3. Replies: 2
    Last Post: February 11th, 2004, 12:03 AM
  4. functions and variables
    By uniopp in forum PHP Development
    Replies: 7
    Last Post: September 25th, 2003, 10:43 AM
  5. Session variables changing values randomly
    By c0p0n in forum PHP Development
    Replies: 10
    Last Post: July 23rd, 2003, 10:21 AM

IMN logo majestic logo threadwatch logo seochat tools logo