Reputation: 15
Im trying to get the Var Dump to display but all i get is a white screen. Any suggestions?
<?php
require('includes/config.inc.php');
require(MYSQL);
$aid = FALSE;
if (isset($_GET['aid']) && filter_var($_GET['aid'], FILTER_VALIDATE_INT, array('min_range' => 0))){
$aid = $_GET['aid'];
$q = "SELECT aircraft_id, aircraft_name AS name, aircraft_type AS type, tail_number AS tn FROM aircraft WHERE aircraft_id=$aid";
var_dump($q); die();
}
Upvotes: 0
Views: 230
Reputation: 11393
Unless MYSQL
is a defined constant in your script, this line of code will fail and the script execution will stop immediately:
require(MYSQL);
As explained in the documentation:
require is identical to include except upon failure it will also produce a fatal E_COMPILE_ERROR level error. In other words, it will halt the script whereas include only emits a warning (E_WARNING) which allows the script to continue.
Upvotes: 1