iiz
12-10-2007, 11:54 PM
i have an index page which basically just has includes and the main html template then i have a page handler script which i have bellow with all the elseif's. all the pages in includes/pages just have $title and $content variables ill include one bellow. i tried replacing the includes in page with
echo "main";
echo "web";
and so forth the output was some like "webmaincontabobrosoft" which is my problem but i dont know how to fix it
index.php:
require ('includes/page.php');
$metakeyword = "web design";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $title; ?></title>
<meta name="keywords" content="<?php echo $metakeyword ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/text.css" />
<script src="js/global.js" type="text/javascript"></script>
</head>
<body>
<center>
<table id="main" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<table id="container" cellpadding="0" cellspacing="0">
<tr>
<td class="trw1">
<img class="right" src="images/live_sup.png" alt="We offer live 24/7 support" />
</td>
</tr>
<tr class="trg">
<td>
<ul id="menu_bar">
<li><a href="index.php?page=main" class="one"><img src="images/nav_but.gif" alt="" /></a></li>
<li><a href="index.php?page=main" class="two"> Home</a></li>
<li><a href="index.php?page=web" class="one"><img src="images/nav_but.gif" alt="" /></a></li>
<li><a href="index.php?page=web" class="two"> Web Design</a></li>
<li><a href="index.php?page=bro" class="one"><img src="images/nav_but.gif" alt="" /></a></li>
<li><a href="index.php?page=bro" class="two"> Brochures</a></li>
<li><a href="index.php?page=soft" class="one"><img src="images/nav_but.gif" alt="" /></a></li>
<li><a href="index.php?page=soft" class="two"> Software Development</a></li>
<li><a href="index.php?page=cont" class="one"><img src="images/nav_but.gif" alt="" /></a></li>
<li><a href="index.php?page=cont" class="two"> Contact Us</a></li>
<li><a href="index.php?page=abo" class="one"><img src="images/nav_but.gif" alt="" /></a></li>
<li><a href="index.php?page=abo" class="two" style="width: 55px; height: 25px"> About Us</a></li>
<li class="right" style="padding:1px 0px 0px 35px;"><span class="orangetext">Phone:</span>800.MTS.DESI<br />
<span class="orangetext">E-mail:</span>Sales@MTSDD.com</li>
</ul>
</td>
</tr>
<tr>
<td class="trw2">
<?php echo $content; ?>
</td>
</tr>
</table><br />
<span id="foot"><a href="index.php?page=home">Home</a> | <a href="index.php?page=web">Web Design</a> | <a href="index.php?page=bro">Brochures</a> | <a href="index.php?page=soft">Software Development</a> | <a href="index.php?page=cont">Contact Us</a> | <a href="index.php?page=abo">About Us</a></span>
</td>
</tr>
</table>
</center>
</body>
</html>
page.php:
<?php
$page = strtolower($page);
if (!isset = $page) {
include ('pages/home.php');
}
else if ($page = 'web') {
include ('pages/web.php');
}
else if ($page = 'bro') {
include ('pages/bro.php');
}
else if ($page = 'soft') {
include ('pages/soft.php');
}
else if ($page = 'cont') {
include ('pages/cont.php');
}
else if ($page = 'abo') {
include ('pages/abo.php');
} else {include ('pages/main.php');}
?>
main.php (im 100% sure issue is not here):
<?php
$title = "MTSDD Professional Web Design, Software Development, and Graphic Design";
$content = "<table style=\"height:282px;\">
<tr>
<td valign=\"top\" style=\"padding:0px; margin:0px;\">
<img src=\"images/main_index.gif\" alt=\"Services Image\" style=\"float:left\" />
</td>
<td valign=\"top\" style=\"padding:0px; margin:0px;\"><img id=\"vline\" src=\"images/vline.gif\" alt=\"\" /></td>
<td style=\"text-align:left;\">
<h2><span class=\"graytext\">Welcome to </span><span class=\"orangetext\">MTS Design & Development</span></h2>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br /><br />
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<br /><br />
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.<br /><br />
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br /><br />
</td>
</tr>
<tr>
<td colspan=\"3\">
<hr/>
</td>
</tr>
</table>
<table width=\"100%;\">
<tr>
<td>
<span class=\"graytext\" style=\"float:left;font-size:12pt;font-weight:bold;\"> Previous Works:</span>
</td>
</tr>
<tr>
<td style=\"width:291px;\">
<div style=\"height:277px;width:291px;border:1px black solid;\">
<a id=\"href\" href=\"http://www.odessapeople.com\" target=\"_blank\">
<img id=\"view\" src=\"images/screen/odessapeople.png\" alt=\"Preview Window\" />
</a>
</div>
</td>
<td valign=\"top\">
<center style=\"background-color:#ffffff;\">
<div id=\"pt\">
<a id=\"thumb\" href=\"javascript:src('view','images/screen/480autotrim.png');href('href','http://www.msobrane.com')\">
<img src=\"images/screen/480autotrim_s.png\" alt=\"480autotrim Thumbnail\" />
</a><br />
<span class=\"orangetext\">URL:</span><a href=\"http://www.msobrane.com\">www.msobrane.com</a><br />
<span class=\"orangetext\">Job:</span> E-Commerce, Logo Design
</div>
<div id=\"pt\">
<a id=\"thumb\" href=\"javascript:src('view','images/screen/odessapeople.png');href('href','http://www.odessapeople.com')\">
<img src=\"images/screen/odessapeople_s.png\" alt=\"Odessapeople Thumbnail\" />
</a><br />
<span class=\"orangetext\">URL:</span><a href=\"http://www.odessapeople.com\">www.odessapeople.com</a><br />
<span class=\"orangetext\">Job:</span> Full Community Site
</div>
<p>Click To View In Window</p>
</center>
</td>
</tr>
</table>";
?>
thank you in advance
-iiz
echo "main";
echo "web";
and so forth the output was some like "webmaincontabobrosoft" which is my problem but i dont know how to fix it
index.php:
require ('includes/page.php');
$metakeyword = "web design";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $title; ?></title>
<meta name="keywords" content="<?php echo $metakeyword ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/text.css" />
<script src="js/global.js" type="text/javascript"></script>
</head>
<body>
<center>
<table id="main" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<table id="container" cellpadding="0" cellspacing="0">
<tr>
<td class="trw1">
<img class="right" src="images/live_sup.png" alt="We offer live 24/7 support" />
</td>
</tr>
<tr class="trg">
<td>
<ul id="menu_bar">
<li><a href="index.php?page=main" class="one"><img src="images/nav_but.gif" alt="" /></a></li>
<li><a href="index.php?page=main" class="two"> Home</a></li>
<li><a href="index.php?page=web" class="one"><img src="images/nav_but.gif" alt="" /></a></li>
<li><a href="index.php?page=web" class="two"> Web Design</a></li>
<li><a href="index.php?page=bro" class="one"><img src="images/nav_but.gif" alt="" /></a></li>
<li><a href="index.php?page=bro" class="two"> Brochures</a></li>
<li><a href="index.php?page=soft" class="one"><img src="images/nav_but.gif" alt="" /></a></li>
<li><a href="index.php?page=soft" class="two"> Software Development</a></li>
<li><a href="index.php?page=cont" class="one"><img src="images/nav_but.gif" alt="" /></a></li>
<li><a href="index.php?page=cont" class="two"> Contact Us</a></li>
<li><a href="index.php?page=abo" class="one"><img src="images/nav_but.gif" alt="" /></a></li>
<li><a href="index.php?page=abo" class="two" style="width: 55px; height: 25px"> About Us</a></li>
<li class="right" style="padding:1px 0px 0px 35px;"><span class="orangetext">Phone:</span>800.MTS.DESI<br />
<span class="orangetext">E-mail:</span>Sales@MTSDD.com</li>
</ul>
</td>
</tr>
<tr>
<td class="trw2">
<?php echo $content; ?>
</td>
</tr>
</table><br />
<span id="foot"><a href="index.php?page=home">Home</a> | <a href="index.php?page=web">Web Design</a> | <a href="index.php?page=bro">Brochures</a> | <a href="index.php?page=soft">Software Development</a> | <a href="index.php?page=cont">Contact Us</a> | <a href="index.php?page=abo">About Us</a></span>
</td>
</tr>
</table>
</center>
</body>
</html>
page.php:
<?php
$page = strtolower($page);
if (!isset = $page) {
include ('pages/home.php');
}
else if ($page = 'web') {
include ('pages/web.php');
}
else if ($page = 'bro') {
include ('pages/bro.php');
}
else if ($page = 'soft') {
include ('pages/soft.php');
}
else if ($page = 'cont') {
include ('pages/cont.php');
}
else if ($page = 'abo') {
include ('pages/abo.php');
} else {include ('pages/main.php');}
?>
main.php (im 100% sure issue is not here):
<?php
$title = "MTSDD Professional Web Design, Software Development, and Graphic Design";
$content = "<table style=\"height:282px;\">
<tr>
<td valign=\"top\" style=\"padding:0px; margin:0px;\">
<img src=\"images/main_index.gif\" alt=\"Services Image\" style=\"float:left\" />
</td>
<td valign=\"top\" style=\"padding:0px; margin:0px;\"><img id=\"vline\" src=\"images/vline.gif\" alt=\"\" /></td>
<td style=\"text-align:left;\">
<h2><span class=\"graytext\">Welcome to </span><span class=\"orangetext\">MTS Design & Development</span></h2>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br /><br />
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.<br /><br />
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.<br /><br />
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br /><br />
</td>
</tr>
<tr>
<td colspan=\"3\">
<hr/>
</td>
</tr>
</table>
<table width=\"100%;\">
<tr>
<td>
<span class=\"graytext\" style=\"float:left;font-size:12pt;font-weight:bold;\"> Previous Works:</span>
</td>
</tr>
<tr>
<td style=\"width:291px;\">
<div style=\"height:277px;width:291px;border:1px black solid;\">
<a id=\"href\" href=\"http://www.odessapeople.com\" target=\"_blank\">
<img id=\"view\" src=\"images/screen/odessapeople.png\" alt=\"Preview Window\" />
</a>
</div>
</td>
<td valign=\"top\">
<center style=\"background-color:#ffffff;\">
<div id=\"pt\">
<a id=\"thumb\" href=\"javascript:src('view','images/screen/480autotrim.png');href('href','http://www.msobrane.com')\">
<img src=\"images/screen/480autotrim_s.png\" alt=\"480autotrim Thumbnail\" />
</a><br />
<span class=\"orangetext\">URL:</span><a href=\"http://www.msobrane.com\">www.msobrane.com</a><br />
<span class=\"orangetext\">Job:</span> E-Commerce, Logo Design
</div>
<div id=\"pt\">
<a id=\"thumb\" href=\"javascript:src('view','images/screen/odessapeople.png');href('href','http://www.odessapeople.com')\">
<img src=\"images/screen/odessapeople_s.png\" alt=\"Odessapeople Thumbnail\" />
</a><br />
<span class=\"orangetext\">URL:</span><a href=\"http://www.odessapeople.com\">www.odessapeople.com</a><br />
<span class=\"orangetext\">Job:</span> Full Community Site
</div>
<p>Click To View In Window</p>
</center>
</td>
</tr>
</table>";
?>
thank you in advance
-iiz