1
basza
switch code
  • 2005/1/1 12:01

  • basza

  • Just popping in

  • Posts: 73

  • Since: 2004/6/21


While writing a module I thourght I would try using switch.
But I am having trouble with it, I'm using the code below only to test it but it keeps going to the default and none of the others.

include "../../mainfile.php";
include XOOPS_ROOT_PATH."/header.php";
switch ($pageid) {

case "test":
echo'hello';
break;
case "test2":
echo 'bye';
break;
default:
echo'index';
break;
}

include_once XOOPS_ROOT_PATH."/footer.php";

Could someone please point out where I'm going wrong.

Thanks in advance

2
Mithrandir
Re: switch code

switch ($_REQUEST['pageid']) {

3
basza
Re: switch code
  • 2005/1/1 12:32

  • basza

  • Just popping in

  • Posts: 73

  • Since: 2004/6/21


Thank you.
That worked.

Login

Who's Online

118 user(s) are online (74 user(s) are browsing Support Forums)


Members: 0


Guests: 118


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits