<?php
$action = $_GET["action"];
/// Action
if($action=="first")
{
/// First Page
echo "page1";
exit();
}
if($action=="second")
{
/// Second Page
echo "page2";
exit();
}
else
{
/// Default page at browser cces
echo "page1";
exit();
?>
<?php
////PLACE YOU HEADERS HERE
////
///////////////////////////////
$action = $_GET["action"];
/// Action
//Main page here
if($action=="")
{
/// Page
echo "page";
/////////////////FOOTERS HERE
exit();
}
//// just copy the second page and name what ever
if($action=="second")
{
/// Second Page
echo "page2";
/////////////////FOOTERS HERE
exit();
}
else
{
/// ERROR PAGE
echo "ERROR PAGE";
/////////////////FOOTERS HERE
exit();
?>
<?php
$Action = $_GET["Action"];
switch ($Action) {
case "First":
echo "First page";
break;
case "Second":
echo "Second page";
break;
default:
echo "Default page";
}
?>
<?php
$Action = $_SERVER["QUERY_STRING"];
switch ($Action) {
case "First":
echo "First page";
break;
case "Second":
echo "Second page";
break;
default:
echo "Default page";
}
?>
$Action = $Action ? $_GET["Action"] : $_SERVER["QUERY_STRING"];
<?php
/**
* @author Milomir
* @copyright 2008
*/
$Action = $Action ? $_GET["Action"] : $_SERVER["QUERY_STRING"];
switch ($Action) {
case "First":
echo "First page";
break;
case "Second":
echo "Second page";
break;
default:
echo "Default page";
}
?>
<?php
/**
* @author Milomir
* @copyright 2008
*/
class Template
{
function tHeader()
{
header("Content-Type: text/html");
echo "<?xml version=\"1.0\"?>\n";
?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MySite</title>
<meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml; charset=ISO-8859-1" />
</head>
<body>
<?php
}
function tFooter()
{
?>
</body>
</html>
<?php
}
}
$Action = $Action ? $_GET["Action"] : $_SERVER["QUERY_STRING"];
$Template = new Template;
$Template->tHeader();
switch ($Action) {
case "First":
echo "First page";
break;
case "Second":
echo "Second page";
break;
default:
echo "Default page";
}
$Template->tFooter();
?>
Comment