- Joined
- Jun 30, 2008
- Messages
- 1,145 (0.20/day)
- Location
- England
System Name | Wasleys PC |
---|---|
Processor | Intel i5 2400 3.10GHz |
Motherboard | Asus P8z68-V |
Cooling | AC Freezer Pro |
Memory | Kingston 4GB (2x2GB) DDR3 Hyperx Memory |
Video Card(s) | HIS ATi 6850 1GB DDR3 |
Storage | Seagate ST3500320AS 500GB Hard Drive SATA II 7200rpm *32MB Cache* |
Case | Antec 900 with mods |
Audio Device(s) | On Board |
Power Supply | OCZ Stealth Xtream 500W |
Software | Windows 7 |
Hi all,
I'm trying to create a page that allows the user to select a case from a drop down menu and in return, the page will print the relevant details.
So far - I've managed to create a drop down menu populated with "M References". I've also managed to get the page to print out all the rows in the mySQL table. However, I can't figure out how to link them together.
I know im missing a piece of code, I'm just not sure what to add. Could someone point me in the right direction?
Thanks
I'm trying to create a page that allows the user to select a case from a drop down menu and in return, the page will print the relevant details.
So far - I've managed to create a drop down menu populated with "M References". I've also managed to get the page to print out all the rows in the mySQL table. However, I can't figure out how to link them together.
Code:
<?php
$options = '';
$filter=mysql_query("SELECT * FROM `mcases` WHERE `CaseReference` > 0");
while($caseReference = mysql_fetch_array($caseResult)) {
$options .="<option>" . $caseReference['CaseReference'] . "</option>";
}
$menu="<form id='filter' name='filter' method='post' action=''>
<label>M:</label>
<select name='filter' id='filter'>
" . $options . "
</select>
</form>";
echo $menu;
?>
<tr>
<td>
<table border="1">
<tr>
<td>Case ID</td>
<td>Exhibit ID</td>
<td>Date / Time</td>
<td>File Size</td>
<td>Camera Make</td>
<td>Camera Model</td>
<td>Height</td>
<td>Width</td>
<td>Longitude</td>
<td>Latitude</td>
<td>Map</td>
</tr>
<?php
while($caseReference = mysql_fetch_array($caseResult)) {
echo '<tr><td>';
echo $caseReference['CaseReference'];
echo '</td><td>';
echo $caseReference['ExhibitReference'];
echo '</td><td>';
echo $caseReference['DateTimeCreated'];
echo '</td><td>';
echo $caseReference['FileSize'];
echo '</td><td>';
echo $caseReference['CameraMake'];
echo '</td><td>';
echo $caseReference['CameraModel'];
echo '</td><td>';
echo $caseReference['Height'];
echo '</td><td>';
echo $caseReference['Width'];
echo '</td><td>';
echo $caseReference['Longitude'];
echo '</td><td>';
echo $caseReference['Latitude'];
echo '</td><td>';
echo '<a href="https://maps.google.co.uk/maps?q='.$caseReference['Longitude'].',-2.102723">View on map</a>';
echo '</td></tr>';
}
?>
I know im missing a piece of code, I'm just not sure what to add. Could someone point me in the right direction?
Thanks