I have the code below which i've managed to put together, only i would prefer Layers (CSS) within the rolling table... This is so i can move the values around to different sections within the table (The idea is that the table would be rolling but the layers would remain in there relative position within the rolling results table).
The only problem is i don't know how to apply a rolling layered table, i can create a layered version but the database information displayed on the output search overlaps oneanother (essentially pilling ontop of each other, becoming blurred etc). Can anyone help?
Below is the rolling table code i have with Javascript.
<?php
if (
isset($_POST['keyword']) ||
isset($_POST['propertytype']) ||
isset($_POST['rent_min']) || isset($_POST['rent_max']) ||
isset($_POST['bedrooms_min']) ||
isset($_POST['bedrooms_max']))
{
$mysqldb = new mysqli("localhost", "user", "password", "database");
$field = $_POST['propertytype'];
$rent_min = $_POST['rent_min'];
$rent_max = $_POST['rent_max'];
$bedrooms_min = $_POST['bedrooms_min'];
$bedrooms_max = $_POST['bedrooms_max'];
if (
isset($_POST['keyword']) ||
isset($_POST['propertytype']) ||
isset($_POST['rent_min']) ||
isset($_POST['rent_max']) ||
isset($_POST['bedrooms_min']) ||
isset($_POST['bedrooms_max'])) {
$result= $mysqldb->query("SELECT Property_Ref, User_Name, Property_Details, To_Rent_Price FROM to_rent WHERE City= '$keyword'");
}
else {
echo "Invalid search criteria has been entered";
}
if ($result->num_rows > 0 ) {
echo "<table width=\"673\" height=\"103\" border=\"0\">
<tr>
<th width=\"145\" scope=\"col\"> </th>
<th width=\"104\" scope=\"col\"> </th>
<th width=\"30\" scope=\"col\"> </th>
<th width=\"376\" scope=\"col\"> </th>
</tr>
"; //table header
while ($row = $result ->fetch_object()) {
//make row clickable using javascript
echo "<tr onmouseover=\"this.style.background='white';this.style.cursor='pointer'\"
onmouseout=\"this.style.background='white';\"
onclick=\"location.href='details.php?classified_id=" . $row->Property_Ref . "'\">
<td class=\"style16\">Ref:" . $row->Property_Ref . "</td>
<td>Username:" . $row->User_Name . "</td>
<td>Monthly rent £" . $row->To_Rent_Price . "</td>
<td>" . $row->Property_Details . "</td>
</tr>"
;
}
echo "</table><br /><br />"; //close table
} else {
echo "No results found.";
}
}
?>