I constructed a webpage using the following code:
<body>
<?php
// find the name of the include file for the main section
$main = (isset($_GET['main']))? $_GET['main'] : "main";
$nav = (isset($_GET['nav'])) ? $_GET['nav'] : "nav";
$top = (isset($_GET['top'])) ? $_GET['top'] : "top";
$mainContent = "$main.php";
$navContent = "$nav.php";
$topContent = "$top.php";
?>
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
<tr height=131>
<td colspan=2 class='top' valign='bottom'>
<?php include($topContent) ?>
</td>
</tr>
<tr height=131>
<td colspan=2 class='???' valign='bottom'>
</td>
</tr>
<tr>
<td class='nav' width=125 valign='top'>
<?php include($navContent) ?>
</td>
<td class='right' valign='top'>
<?php include($mainContent) ?>
</td>
</tr>
</table>
</body>
everything is working fine till I want to change the content of "main" with an image link which is in the "nav" cell and which I wrote like this:
<a href='index.php?main=home.php'>
<img src=home.gif">
</a>
Well, regrettably nothing is showing up just a blank white table cell ???
Any help would be much appreciated
PHP & links
Moderator: General Moderators
Your quotes are placed incorrectly.. (should be src='image.gif')
also.. change the way of including the pages to something like this:
switch ($_GET['main']){
case "possibility1":
$main="possibility1.php";
break;
case ...
else ppl can add anything they want by placing something like this in their url:
somepage.php?main=VERYSECUREPAGE
and that's not what you want
also.. change the way of including the pages to something like this:
switch ($_GET['main']){
case "possibility1":
$main="possibility1.php";
break;
case ...
else ppl can add anything they want by placing something like this in their url:
somepage.php?main=VERYSECUREPAGE
and that's not what you want