I have added the scripts you mentioned to my page, but it does not seem to be working. Instead of getting the images, I'm getting boxes with red squares, and when you right-click on the image and select properies, it is not even displaying the full address for that image (no idea whether its meant to or not though!)
Anyway, I have been reading up on functions and the like, and have tested numerous changes to the script in an attempt to make those red boxes turn to images!
Here's the script for the function of the image changer: :
<?php
function sectImage($sect='default')
{
switch($sect)
{
default:
$img = 'default.jpg';
break;
case 'history':
$img = 'history.jpg';
break;
case 'info':
$img = 'info.jpg';
break;
case 'company':
$img = 'company.jpg';
break;
case 'news':
$img = 'news.jpg';
break;
case 'interact':
$img = 'interact.jpg';
break;
}
return $img;
}
?>
And the code and it's positioning currently being used to recall the function that was created at the start of the page (code above):
<table width="96%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#000000">
<tr>
<td> <div align="left"><img src="<?php sectImage($_GET['sect']); ?>"></div></td>
<td width="71%">
<div align="right"><img src="title1.jpg" width="400" height="103"></div>
</td>
</tr>
Can you shed any more light on that Brett?? In fact, can anyone see where the problem might lay? The only thing that seems to appear to me is that $sect is not obviously given a value, but maybe it is and I'm just not recoginising it??! Any help would be gratefully received!!!!!!