hey everyone,
ive got 12 images (jewellery stones) with related description.
each stone represents a month of the year.
im trying to create a interactive module where the user could type his/ her month of birth and the related stone <td> will be highlited (simple indication like a border around the <td>) the all thing is on the same page, and once the user submit his / her month of birth the page will just refresh and position itself on the related stone.
the code so far retrieve a $month var which is the month number but...
im getting an error message saying:
"'Warning: Cannot modify header information - headers already sent by (output started at /home/belltim/public_html/new/stones.php:3) in /home/belltim/public_html/new/stones.php on line 142
to understand what i mean, you can view the page ive got so far at:
http://www.bellissimab.com/new/stones.php
pls view it in IE as the submit button doesnt work on firefox. i need to fix it
this is the code i wrote so far:
$month = $_GET[month];
<div id="birthstone_find">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
<div id="month">
<select name="month">
<?php
$months = array(1=>'January','February','March','April','May','June',
'July','August','September','October','November','December');
foreach($months as $key => $val)
{
echo "<option value='$key'>$val</option>\n";
}
?>
<input type="image" src="http://www.bellissimab.com/assets/submit.gif" value="Submit" alt="Submit"></select>
</div>
</form>
<?
switch($_REQUEST['month'])
{
case('1'):
header('Location: '.$_SERVER['PHP_SELF'].'?highlight=garnet#garnet');
break;
case('2'):
header('Location: '.$_SERVER['PHP_SELF'].'highlight=amethyst#Amethyst');
break;
case('3'):
header('Location: '.$_SERVER['PHP_SELF'].'highlight=Aquamarine#Aquamarine');
break;
}
?>
</div>
<div id="stones">
<table>
<tr>
<td class="stone_bg"><a name="garnet"><img src="http://www.bellissimab.com/assets/stone1.gif" border="0" alt="Garnet" /></a></td>
<td class="stone_desc"><span id="stone_title">Garnet</span><br />Garnet’s name derives from it’s resemblance to red pomegranate seeds. It is a semi-precious stone, in various shades of red depending on where it is mined. It is believed to have healing powers and to enhance creativity and inspiration. It represents constancy.</td>
</tr>
<tr>
<td class="stone_bg"><a name="Amethyst"><img src="http://www.bellissimab.com/assets/stone2.gif" border="0" alt="Amethyst" /></a></td>
<td class="stone_desc"><span id="stone_title">Amethyst</span><br />Amethyst is crystallised quartz, also known as Beryl and is typically purple or violet in colour. It is believed to have healing qualities and represents sincerity.</td>
</tr>
<tr>
<td class="stone_bg"><a name="Aquamarine"><img src="http://www.bellissimab.com/assets/stone3.gif" border="0" alt="Aquamarine" /></a></td>
<td class="stone_desc"><span id="stone_title">Aquamarine</span><br />Aquamarine is a blue semi-precious stone in the Beryl family. It is thought to stabilize and balance the emotions and represents courage.</td>
</tr>
please let me know if you need me to elaborate on anything.
Tnx, Shooka