Jump to content

Archived

This topic is now archived and is closed to further replies.

dark-threat

RH 9 / Apache 2.0.40 / php 4.2.2

Recommended Posts

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[=-

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.