Page 2 of 2

Posted: Mon Mar 29, 2004 6:54 pm
by m3mn0n
Or to have more easier to read code, that won't give you a parse error...

Code: Select all

<?php
if ( isset ( $_GET['page'] ) )
{ 

  switch ( $_GET['page'] )
  { 

    case 'home': 

      echo 'This is the home page.'; 
      //or if you have a main homepage you can do like: 
      //include("home.html"); 

    break; 

    case 'downloads': 

      echo 'this is downloads page..'; 
      //include("downloads.html"); 

    break; 

    case 'contact': 

      echo 'this is contact page.'; 
      //include("contact.html"); 

    break; 

  } // end switch

} // end if
?>

Posted: Mon Mar 29, 2004 7:00 pm
by Illusionist
I just copied the code he had pasted and added to it, i wasn't checking for errors

Posted: Mon Mar 29, 2004 7:07 pm
by m3mn0n
It's okay. We all make mistakes. :wink:

Posted: Mon Mar 29, 2004 7:10 pm
by Illusionist
:-D