windows 2000 move to linux

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sphen
Forum Newbie
Posts: 4
Joined: Mon Feb 17, 2003 4:12 am

windows 2000 move to linux

Post by sphen »

Hi all;

I have developed a website in php & mySQL on a Windows 2000 Server, I have now moved over to Redhat Linux Apache Server and now the site does not see any of my case statements.

It does see the include files but does not show anything within a case statement.

Thanks
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

What does the code look like?

Mac
sphen
Forum Newbie
Posts: 4
Joined: Mon Feb 17, 2003 4:12 am

the code

Post by sphen »

Here is the first part of the code:

Code: Select all

<?php

	 //includes
	include("../java/conf.php");

	//create the layout for the chosen link
  switch ($page_type)
    &#123;
//*******************************************************************************
      case 'intro'; //layout for the intro  page
       echo "<table border='0' cellspacing='0' cellpadding='0' width='95%'>

       <tr><td bgcolor='#005198' valign='top' align='left' width='28%'><font color='#FFFFFF'>
       &nbsp;<b>INTRO</b></font> </td>
        <td bgcolor='#005198' valign='top' align='right' width='14%'><img src='../images/aboutmecer.gif' width='46' height='16' align='top'></td>
        <td width='58%'><img src='/images/spacer.gif' width='1' height='16'></td>
        </tr>    <tr> <td colspan='2'><img src='../images/spacer.gif' width='1' height='1'></td>
           <td bgcolor='#B9C5DF' width='58%'><img src='../images/spacer.gif' width='100%' height='1'></td>
                    </tr>  <tr> <td colspan='3'>&nbsp;</td>    </tr>   <tr>  <td colspan='3'> " ;

        $result = mysql_query("SELECT information from mecercontent WHERE subsection='intro'AND section = 'intro'" ,$db);
		$myrow = mysql_fetch_array($result);
		$reqInfo = $myrow&#1111;"information"];
		echo nl2br($reqInfo);
The problem seems to be the same throughout as none of the other pages work and it all operates on the same type of system e.g. Using a whole bunch of case statements.

It is somehow not processing the case statements
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Where does $page_type come from?

Mac
sphen
Forum Newbie
Posts: 4
Joined: Mon Feb 17, 2003 4:12 am

Post by sphen »

page_type is a part of a case statment if it selected the info within it will be shown.

THe statement comes from the link, I have manually told all the links to equal some sort of page_type so that the info within that certain switch will be shown
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Have you read:
viewtopic.php?t=511

You probably need to use $_GET['page_type'] instead of $page_type.

Mac
sphen
Forum Newbie
Posts: 4
Joined: Mon Feb 17, 2003 4:12 am

thanks

Post by sphen »

gr8 thanks I'll have a look
Post Reply