thryb Posted August 22, 2007 Share Posted August 22, 2007 Good day freaks! Im currently on a litle webpage project and I would like to know if there is a way that I can block someone to reaccess the page I redirected too after they go by paypal. Lets say it goes that way : Paying by paypal -> Redirected to the form they have to fill -> Submit to add stuff to DB (at this point since they saw the name of the page they were on Id like to block the access cause I dont want they to be able to fill the form again) -> Redirected to the main page. If anyone as any idea please let me know cause Im trying to figure out and I cant find anything Thanks in advance Quote Link to comment Share on other sites More sharing options...
tarun Posted August 22, 2007 Share Posted August 22, 2007 Store Wether Theyve Seen The Page As A Boolean Type And Then Perform The Check On The Page... Quote Link to comment Share on other sites More sharing options...
flappy_warbucks Posted August 22, 2007 Share Posted August 22, 2007 Sessions or cookies... you could say for example: if ($_COOKIE['this_page'] == true) { //do with them what you will if the cookie is set } else { setcookie("this_page",true); //set the cookie so that you know they have been on that page. } or you could use sessions but thats what i would do Quote Link to comment Share on other sites More sharing options...
tarun Posted August 22, 2007 Share Posted August 22, 2007 But Then Its Not Very Safe Is It Because The Cookie Can Be Deleted Or You Can Just Block All Cookies So The Cookie Can't Even Be Set In The First Place DataBase = Good | Session/Cookie = Bad Quote Link to comment Share on other sites More sharing options...
Psycho Posted August 22, 2007 Share Posted August 22, 2007 But Then Its Not Very Safe Is It Because The Cookie Can Be Deleted Or You Can Just Block All Cookies So The Cookie Can't Even Be Set In The First Place DataBase = Good | Session/Cookie = Bad And how is a database more secure? Using a database implies that the user will have to log in so that you can determine who they are first before determining whether to show them the page or not (Assuming the OP is already using a database). What prevents them from creating a new account? No matter what solution is chosen it would be a simple matter to defeat. Most users do not delete their cookies and I would choose that method as well based upon the scarce information provided by the OP. If more details were provided I might suggest a different approach. Quote Link to comment Share on other sites More sharing options...
tarun Posted August 22, 2007 Share Posted August 22, 2007 Sorry That Was My Personal View And Anyway Sessions Can Be Destroyed... Quote Link to comment Share on other sites More sharing options...
thryb Posted August 22, 2007 Author Share Posted August 22, 2007 I thought about the database too, but that would mean (like mj said) that the user has to login, and I want something really simple. Cookie seems like a good idea. Is there a way to completly remove the /thispage.php so the user can only see www.this.com Kinda like the index.php or htm when you first enter. Quote Link to comment Share on other sites More sharing options...
tarun Posted August 22, 2007 Share Posted August 22, 2007 Oh... You Want Mod_Rewrite For That PHP Freaks Mod_Rewrite Board But Do You Think That Would Work Quote Link to comment Share on other sites More sharing options...
thryb Posted August 22, 2007 Author Share Posted August 22, 2007 Thanks gonna read a bit on that! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.