Jump to content

Switch Conditionals


redfire

Recommended Posts

Okay I'm currently working on a new template, and instead of making a hole new page for every thing I'm setting it up just it just changes the one area.

[code]<?php switch($_GET['id'])
{
default:
  include('home.php');
  break; 
case 'news':
  include('news.php');
  break; 
case 'forums':
  include('forums.php');
  break; 
}
?>[/code]

and I have the links set-up like

[code]<a href="index.php?id=news">News</a>[quote][/quote][/code]

I have it set-up like that but it doesn't want to work :(
Link to comment
https://forums.phpfreaks.com/topic/25449-switch-conditionals/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.