irkevin Posted December 2, 2008 Share Posted December 2, 2008 Hi, I don't know if this sounds ok, but what i want to do, is only give access to a page if there are random numbers in it. Basically, i have a link to a form, then the admin sends a email along with the url if he approved of it. But right now the url is accessible to everyone. How can i prevent direct access to the url unless an approval has been made? Quote Link to comment Share on other sites More sharing options...
DeanWhitehouse Posted December 2, 2008 Share Posted December 2, 2008 Something like? <?php if(isset($_GET['id'])) { $id = (int) $_GET['id']; echo $id; } else { header("Location:someotherpage.php"); } ?> page addi = http://yoursite.com?id=1 Quote Link to comment Share on other sites More sharing options...
irkevin Posted December 2, 2008 Author Share Posted December 2, 2008 well i think that should do the trick.. Looks like i need some sleep.. Wonder why i didnt think of that. Thanks for the tip Quote Link to comment Share on other sites More sharing options...
irkevin Posted December 2, 2008 Author Share Posted December 2, 2008 Yups it did work.. Thank you 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.