Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[JS/PHP] Don't go to previous page..

Status: Pooping
Joined
Jul 16, 2008
Messages
861
Reaction score
25
Hi, guys i want that people can't go the their previous page they visited @ my site.. What script i need to use for it and in what language?
 
Status: Pooping
Joined
Jul 16, 2008
Messages
861
Reaction score
25
^^, i know im not that good @ scripting i just copy sources and put some own things at it but yeah.. Im gonna search a Tutorial now or just post 1 if you found 1 ^^
 
Status: Pooping
Joined
Jul 16, 2008
Messages
861
Reaction score
25
Thnx Dutch is always easyer ^^ tyvm.
 
Custom Title Activated
Loyal Member
Joined
Jun 28, 2007
Messages
2,986
Reaction score
3
Lets keep it English, shall we?

What I would do, remember the previous page URL in a session, and make sure the new URL is not the same as the one in the session ;)
 
Banned
Banned
Joined
Jun 8, 2007
Messages
165
Reaction score
8
You could also do something with $_SERVER['HTTP_REFERER'], but it can't always be trusted.
 
Joined
Jun 8, 2007
Messages
1,985
Reaction score
490
You could also do something with $_SERVER['HTTP_REFERER'], but it can't always be trusted.

HTTP_REFERER accounts for links from other sites; it doesn't account for the Back button in every browser though ;)

What Daevius said would work...

But the bast way IMO would be to create a page with like 5 lines of code:
PHP:
<?php
session_start();
$_SESSION['nextPage']++;
$pages = 'page1.html,page2.html,page3.html,page4.html'; //Pages you want to link Separated by commas ;)
$allPages=explode(',',$pages);
include($allPages[$_SESSION['nextPage']]);
?>
.. Just make sure the pages are in order from first to last.

This way, if they go back, they still get the next page >:p
evil huh?
Hope this helps ;)
 
Back
Top