Created
October 15, 2013 21:12
-
-
Save TalkWithTheExperts/6998745 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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