When I started PHP a year ago, I was always able to simply do my HTML, then do a switch statement and have certain things occur based on that. Example:
function defaultbody() {
HTML HERE
}
switch ($i) {
case "edit":
echo "Edit here";
break;
default:
defaultbody();
}
Now, I get undefined index all over town. Yes, I realize I can usually use isset in an if statement to fix this; yes, I realize I can usually use $_POST['i'] or $HTTP_POST_VARS['i'].
But I haven't been able to figure this out in a switch statement!