Switch problem
Posted: Fri Feb 15, 2008 7:26 am
I have created a dynamic footer for a client's page:
I have created that way that in every page except contact the logo appears at the page footer. Problem is that they also want the logo out of the index page. Now, if I remove the code in the default section, it will be removed as well to all other pages, and I don't want to add other cases for each and every page.
Code: Select all
<!--page inclusion-->
<?php
switch($_GET['page']){
case 'contact':
echo "";
break;
case 'products':
echo "
<table width='781' height='121' border='0' align='center' cellpadding='0' cellspacing='0'>
<tr>
<td height='36' colspan='2' align='left' valign='top' class='style10a'></td>
</tr>
<tr>
<td width='423' align='left' valign='top'></td>
<td width='358' align='left' valign='top'>
<img src='images/index/enosi.jpg' alt='' width='347' height='85' /></td>
</tr>
</table>";
break;
default:
echo "<table width='781' height='121' border='0' align='center' cellpadding='0' cellspacing='0'>
<tr>
<td height='36' colspan='2' align='left' valign='top' class='style10a'></td>
</tr>
<tr>
<td width='423' align='left' valign='top'></td>
<td width='358' align='left' valign='top'>
<img src='images/index/enosi.jpg' alt='' width='347' height='85' /></td>
</tr>
</table>";
}
include_once($include);
?>