php switch menu undefined variable -
this question has answer here:
- reference - error mean in php? 29 answers
the following code has been moved new server , throwing error:
notice: undefined variable: menu in * on line 128 notice: undefined variable: menu in * on line 160 notice: undefined variable: menu in * on line 170
here code:
<a href="index.php?menu=profile">profile</a> <a href="index.php?menu=regisztracio">regisztráció</a> <a href="index.php?menu=kapcsolat">kapcsolat</a> <?php switch($menu) { case "profile": { echo("profil"); } case "regisztracio": { echo("regisztráció"); } case "kapcsolat": { echo("kapcsolat"); } default: { echo("home page"); } } ?>
i didn't understand lang problrem not using $_get['menu']
retrieve parameter.
$menu = $_get['menu']; switch($menu) { .... }
Comments
Post a Comment