Skip to content
Snippets Groups Projects
Commit 3143154c authored by Imran Hussain's avatar Imran Hussain
Browse files

Better handling of missing url params

parent 132f86c2
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,11 @@
* system.
*/
// If there isn't api key then die
if (isset($_GET['apikey']) == FALSE){
die("Please provide an api key");
}
// Get the api key the user is trying to use
$apikey = $_GET['apikey'];
......@@ -21,6 +26,11 @@ if ( in_array($apikey,$apikeys) == FALSE) {
// If they get here then they are allowed to be here
// If there isn't a postcode provided then die
if (isset($_GET['postcode']) == FALSE){
die("Please provide a postcode");
}
// Get the postcode they are trying to search for
$postcode = $_GET['postcode'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment