Page 1 of 1

putting pages together.

Posted: Sun Jul 28, 2002 9:00 pm
by pb2ya
ok, all i want to know is how to use the switch statement so that when a certain link is clicked, text is displayed.

Posted: Sun Jul 28, 2002 9:39 pm
by hob_goblin

Code: Select all

$pid = $_GETї'pid'];
switch ($pid) {
    case 0:
        print "page id is 0.";
        break;
    case 1:
        print "page id is 1";
        break;
    case 2:
        print "page id is 2";
        break;
    default:
        print "page id is something else";
        break;
}
;-) and try that out with page.php?pid=1

ok ty

Posted: Mon Jul 29, 2002 7:52 pm
by pb2ya
i was doing the same thang b4 without the $_GET. thats y it didnt work.
thanx man 8)