Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limit Direct Access .. ? 1

Status
Not open for further replies.

triquad

Programmer
Feb 5, 2009
16
EG
I have made a form that whenever the user completes the registration successfully, it redirects him/her to a new page (thankyou.php) saying "thank you for registering, bla bla....". It works fine but I want to prevent the direct access to thankyou.php so if the user types " it redirects him to the form without displaying the thank you message. But in case the user succeeds to register, thankyou.php opens & displays the thank you message.

Do you have any idea how can I do that ?
 
Set a Session variable in your processing script before redirecting to the thank-you page, and have the thank you page check for he presence of the variable. If its there display the thank-you text. If not redirect back to the form.




----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top