Jump to content

Make page no longer available


mgmoses

Recommended Posts

Hello all - I'm at the conclusion of my script and I have what I believe to be my last question.  My html form posts to my php script, which directs the client to a "thank you" page.  At that point I would like to make the html form page no longer available from their "back" button.  The reason  is I do not want them to be able to go back and submit the same form again.  Does anyone know what code I could use to do this?  Thanks for the help!  :shrug:

Link to comment
Share on other sites

ok, bare with me because im new, but if the users are saved on a database then add something in to like 'allowed'

<? if(fetch allowed == yes){ ?>

Page goes here

<? }else{

echo"Sorry, you have already completed this page.";

} ?>

 

if its not done from a database maybe try adding it in a $_session and do the same but do

 

<? if(!$_session[alowed]){ ?>

Page goes here

<? }else{

echo"Sorry, you have already completed this page.";

} ?>

Link to comment
Share on other sites

Thanks for the good ideas but in rethinking it I will leave it as is.  Maybe the user would want to go back and print the page that he filled out for his records?  The info does go to a database but its not that big a deal to see duplicate records in my case.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.