Jump to content

Mad programmer

Members
  • Posts

    26
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Mad programmer

  1. Have you thought about using sessions? If the user enters the page the script could set an session (which it checks for at the top to prevent multiple views). Here's an example if what I mean: <?php // Initialize sessions ofcourse.. session_start(); // [url]/page.php?delete // Allows you to unset the session so you can try this out if (isset($_GET['delete'])) { unset($_SESSION['check']); exit(); } // If the session is set and equals 123 we already have the page open! if (!empty($_SESSION['check'])) { if ($_SESSION['check'] == '123') { echo 'You should not be here!'; exit(); } } // Set the session and continue your script.. $_SESSION['check'] = '123'; echo 'welcome!'; I hope that this is useful to you. Edit: Remember! If the user goes out of this page by a link or if your script logic has been processed, you need to UNSET this session. If you won't do this the user will not be able to access this page anymore. (Except if they wipe their session cookies )
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.