Hi everyone, am very new to PHP and am struggling with an getting rid of the following error message:
Notice: Undefined index: subpage in c:\Inetpub\wwwroot\main.php on line 30
Below is the section of code:
<?php // file main.php
echo '<div id="mid">';
switch ($_GET['subpage'])
{
case 'GrpServ':
include "GrpServ.php";
break;
case 'ShortSea':
include "ShortSea.php";
break;
case 'DeepSea':
include "DeepSea.php";
break;
case 'HMRC':
include "HMRC.php";
break;
default:
include "home.php";
}
echo '</div>';
?>
I've had a look through the forums and have seen that some people suggest using isset and empty but i'm a little unsure on how to incorporate either into my code.
Please could someone help? I dont like to have things done for me but this one is proving to be a bit of a git at the moment!
Many thanks