php switch am I doing it wrong? -
i'm trying make multiple pages in 1 file , have this
<? switch($action){ case "add": add(); break; default: hello(); break; } function add() { echo "hello"; } function hello() { echo "hello1"; } ?> but when got ****.php?action=add still "hello1"
what doing wrong hello
switch on $_get['action'] instead.
Comments
Post a Comment