Jump to content


Photo

RH 9 / Apache 2.0.40 / php 4.2.2


  • Please log in to reply
2 replies to this topic

#1 dark-threat

dark-threat
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 07 May 2003 - 07:22 PM

Hi!
I have a problem with Redhat 9 and the default packages for apache mysql and php.
php works (i think), because various scripts like phpMyAdmin and the function phpinfo() are working!
but if i do a little switch, case oder if else oder something like that, nothing would work!!!
example script i tested:

<?php
switch($page){
default:
echo \"hello!\";
break;
case \"test\":
echo \"hello1234\";
break;
}
?>

if i call the script with scriptname.php it shows \"hello!\" so i think if i call it with scriptname.php?page=test there must be the message \"hello1234\" but it isn´t! i don´t know why! the script works with the server of my friend, i think its an old apache. but i have no idea what to do! please help me!

cYa

-=]Dark_Threat[=-

#2 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 07 May 2003 - 07:43 PM

I guess its more of code issue

u might have turned off the resgisterd_globlas = off

while ur friend might have had it on


http://localhostswitch.php?page=test

<?php 



$page = $_GET[\'page\'];



switch($page)

{ 

case "test": 

echo "hello1234"; 

break; 

default: 

echo "hello!"; 

break; 



} 

?>

Hope this helps!
Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks

#3 dark-threat

dark-threat
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 07 May 2003 - 08:00 PM

yes, thats it!
thanks a lot! now my life has a reason again :)

cu!

-=]Dark_Threat[=-




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users