this Code works in PHP 5.3, but not in PHP 5.4 > Error Notice: Undefined index:
//station
$station = $_GET['station'];
if (!$station)
$station = 'main';
//base path
this Code works in PHP 5.3, but not in PHP 5.4 > Error Notice: Undefined index:
//station
$station = $_GET['station'];
if (!$station)
$station = 'main';
//base path
it depends on the setting of your error_reporting, but you should always check if the 'station' was already set through the http(s) like www.example.com?station=piccadily
if (isset($_GET['station']) && $station = $_GET['station'])
else $station = 'main;
or simplify it to:
$station = isset($_GET['station']) ? $_GET['station'] : 'main';
since PHP7 you may write with coalesce operator:
$station = $_GET['station'] ?? 'main';