PHP switch with GET doesnt work after php upgrade

106 views Asked by At

I have a website that is running correctly on php 5.2.6, but i have a problem with php 5.4 . After I click on the link, I am logged out , so I have to login again and I get the first form.

my HTML and PHP code are in the same file.

HTML:

<table width="99%" cellpadding="0">
<tr>
  <th class="<?=selected('',$_GET['form'])?>">
    <a href="./?web=login">Personal info</a>
    <img src="<?=$mark1?>" title="<?=$title1?>" alt="<?=$title1?>">
  </th>
  <th class="<?=selected('1',$_GET['form'])?>">
    <a href="./?web=login&amp;form=1">Meeting</a>
    <img src="<?=$mark2?>" title="<?=$title2?>" alt="<?=$title2?>">
  </th>
  <th class="<?=selected('2',$_GET['form'])?>">
    <a href="./web=login&amp;form=2">Competition 1</a>
    <img src="<?=$mark3?>" title="<?=$title3?>" alt="<?=$title3?>">       
  </th>
  <th class="<?=selected('4',$_GET['form'])?>">
    <a href="./?web=login&amp;form=4">Competition 2</a>
    <img src="<?=$mark4?>" title="<?=$title4?>" alt="<?=$title4?>">
  </th>
</tr>

PHP:

               switch ($_GET['form'])
                 {
    case 3:
      include "passwd.php";
    break;
     case 4:
      include "competition2.php";
    break;
    case 2:
      include "competition1.php";
    break; 
            case 1:
      include "meeting.php";
    break;
    default:
      include "pinfo.php";
    break;
   } // print_r($_SESSION);

            }else{          ?>
0

There are 0 answers