switch works on localhost, not webhost...
Hello all. I have problem with switch statement in version PHP 4.2.2 on linux
server. in my error page i am not getting the value of error code ec passed which is working perfectly on windows 2000.
That means echo $_GET['ec']; is empty ....
in the url i am getting the value of ec as 0...
like this
http://191.5.2.23/admin/ERROR.PHP?ec=0
pls help
thanx in advance
ckb
pls check part of my code:
<?php // these code used to diplay message if there is any Unathiora
include("connection.php");
// $ec=$_GET['ec'];
//switch($ec)
if(isset($_GET['ec']) ) {
switch($_GET['ec'])
{
case 0:
$message="<font color='black'><b>
Your user name or password is incorrect!
<a href=index.php>Please try again.</a></b></font>";
break;
case 1:
$message="<font color='darkgreen'><b>
There was an authentication error.
Please<a href=index.php>Log in </a>correctly.</b>";
}
}
?>
switch works on localhost(windows 2000) but not on Linux
Moderator: General Moderators
Try looking into this viewtopic.php?t=511. Sounds like a version collide.
reply
hi all,
now it's working fine......it was php version 4.2.2 only and my code also was correct....but a small mistake....i saved my file as ERROR.PHP IT WAS THE CAUSE OF MY PBM.....since it was linux it is not recognising my php file at all when i saved in capital letter....now everything i s ok.....
thanx a ot for all....
ckb
now it's working fine......it was php version 4.2.2 only and my code also was correct....but a small mistake....i saved my file as ERROR.PHP IT WAS THE CAUSE OF MY PBM.....since it was linux it is not recognising my php file at all when i saved in capital letter....now everything i s ok.....
thanx a ot for all....
ckb