Skip to content

Instantly share code, notes, and snippets.

@TalkWithTheExperts
Created October 15, 2013 21:12
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 TalkWithTheExperts/6998745 to your computer and use it in GitHub Desktop.
Save TalkWithTheExperts/6998745 to your computer and use it in GitHub Desktop.
// This is the code editor.
// Request permission from HAWK to post code.
config/production.php:
----------------------
define("DATABASE_NAME", "some_name");
htdocs/index.php:
-----------------
require_once("../config/production.php");
// use constants here to connect
// related php.ini setting: open_basedir
/// ----- Harlem -----------
$id = $_GET['id'];
if(!is_numeric($id)) {
// the id isnt as expected
//eg news.php?id=asfefe
//
} else {
// The ID is numeric, continue to get news item
// eg news.php?id=1234
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment