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? Link to comment https://forums.phpfreaks.com/topic/135095-solved-allow-access-to-link-only-if-there-is-random-numbers/ 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 Link to comment https://forums.phpfreaks.com/topic/135095-solved-allow-access-to-link-only-if-there-is-random-numbers/#findComment-703678 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 Link to comment https://forums.phpfreaks.com/topic/135095-solved-allow-access-to-link-only-if-there-is-random-numbers/#findComment-703681 Share on other sites More sharing options...
irkevin Posted December 2, 2008 Author Share Posted December 2, 2008 Yups it did work.. Thank you Link to comment https://forums.phpfreaks.com/topic/135095-solved-allow-access-to-link-only-if-there-is-random-numbers/#findComment-703697 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.