Jump to content

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

Link to comment
https://forums.phpfreaks.com/topic/442-rh-9-apache-2040-php-422/
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!

Link to comment
https://forums.phpfreaks.com/topic/442-rh-9-apache-2040-php-422/#findComment-1496
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.