Now, I've got another problem...
I have a function (another switch) that determines which buttons will be displayed. That switch is based on the $security_level variable:
function main_menu()
{
echo "<form action='".$_SERVER['php_self']."' method='post'>";
switch ($security_level):
case 1:
echo "<input name='1' type='submit' value='1' />
<input name='2' type='submit' value='2' />";
break;
case 2:
echo "<input name='1' type='submit' value='1' />
<input name='2' type='submit' value='2' />
<input name='3' type='submit' value='3' />";
break;
case 3:
echo "<input name='1' type='submit' value='1' />
<input name='2' type='submit' value='2' />
<input name='3' type='submit' value='3' />
<input name='4' type='submit' value='4' />";
endswitch;
echo "</form>";
}
Yet, when I call this function in my index.php file, it does nothing:
$security_level = security_level();
echo $security_level;
main_menu();
I don't see what's wrong with it... if I copy-paste it to index.php, it displays fine. And, there's no variable to return, so what's missing? stumped (is it normal to be stumped like this all the time when beginning to code?)