Skip to content

Instantly share code, notes, and snippets.

@thcipriani
Created December 6, 2011 22:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thcipriani/1440407 to your computer and use it in GitHub Desktop.
Save thcipriani/1440407 to your computer and use it in GitHub Desktop.
No _GET
<?php
//So when you login you're redirected to http://.../inventory?context=index which is this page
session_start();
if($_SESSION['LOGIN_STATUS'] != "OK"){
session_unset();
session_destroy();
echo 'You are not logged in, redirecting in 2 seconds
<meta http-equiv="Refresh" content="2; URL=index.php">';
}else{
include('./header.php');
//I wrote the following two lines to get the code to work, but I feel like I must be missing something.
//Before I defined the below, this page was just blank.
//$context = $_GET['context']?$_GET['context']:'';
//$doqtype = $_GET['doqtype']?$_GET['doqtype']:'';
//sam inventory
if($context == "index"){
// Do Stuff
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment