MrFahad
asked on
search result display help
hello,
i have made a page to display the result of a search, how ever i couldn't do it as i wanted
here is a link of how i want it: http://www.arencore.com/property.php
i will post the code i did and screen shot of the page and db info for help
and for retrieving the image, the name of the image is saved in db (imageinfo field) and it's always uploaded to uploaded_images/
so i did this code for retrieving it:
echo '<img width="159" height="113" src="uploaded_Images/';
echo $row['imageinfo'] . '" alt="' . $row['imageinfo'];
echo '"/></a>
result.jpg
i have made a page to display the result of a search, how ever i couldn't do it as i wanted
here is a link of how i want it: http://www.arencore.com/property.php
i will post the code i did and screen shot of the page and db info for help
and for retrieving the image, the name of the image is saved in db (imageinfo field) and it's always uploaded to uploaded_images/
so i did this code for retrieving it:
echo '<img width="159" height="113" src="uploaded_Images/';
echo $row['imageinfo'] . '" alt="' . $row['imageinfo'];
echo '"/></a>
<?php require_once("includes/connection.php"); ?>
<?php require_once("includes/functions.php"); ?>
<?php include("includes/header.php"); ?>
<td id="page">
<h2>Welcome to Coordination Real Estate</h2>
<script type="text/javascript" src="javascript/container_core-min.js"></script>
<script type="text/javascript" src="javascript/carousel.js"></script>
<link rel="stylesheet" type="text/css" href="stylesheets/base-min.css">
<link href="stylesheets/carousel.css" rel="stylesheet" type="text/css">
<link href="stylesheets/yui.css" rel="stylesheet" type="text/css">
<?php
$listedPrice = $_POST['listedPrice'];
$No_bedroom = $_POST['No_bedroom'];
$PropertyCountry = $_POST['country'];
$PropertyCity = $_POST['cityList'];
$PropertyType = $_POST['PropertyType'];
$NO_bathroom = $_POST['NO_bathroom'];
$listtemp = explode("-", $listedPrice,2);
$query = "SELECT * from properties WHERE
listedPrice between {$listtemp[0]} AND {$listtemp[1]} AND
No_bedroom = $No_bedroom AND
PropertyCountry = '$PropertyCountry' AND
PropertyCity = '$PropertyCity' AND
PropertyType = $PropertyType AND
NO_bathroom = $NO_bathroom
LIMIT 0,10;";
$query2 = mysql_query($query);
if(!$query2) die('SQL error: '.mysql_error());
echo '<table>';
while ($row = mysql_fetch_array($query2)) {
// Print out the contents of each row into a table
echo "<tr><td>";
echo $row['Propertyid'];
echo "</td><td>";
if ( $row['PropertyType'] == 1 ) {
echo "Apratment"; } else {
echo "Villa"; }
echo "</td><td>";
echo $row['PropertyAddress'];
echo "</td><td>";
echo $row['No_bedroom'];
echo "</td><td>";
echo $row['ListingDate'];
echo "</td><td>";
echo $row['ListedPrice'];
echo "</td><td>";
echo $row['DateBuild'];
echo "</td><td>";
echo $row['Area'];
echo "</td><td>";
echo $row['Description'];
echo "</td></tr>";
}
echo "</table>";
?>
</td>
</tr>
</table>
<?php require("includes/footer.php"); ?>
db.jpgresult.jpg
ASKER
ok this display the image but it's not arranged like http://www.arencore.com/property.php i tried to see the source code but i couldn't understand how to do it
please help
thank you
please help
thank you
ASKER
any help please ?
i can help you working on it
can you send me a table dump please ....
put the attached code in a loop and replace its value with your search results values ,,,, ;)
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="box01">
<td width="28%" height="136" align="center" valign="middle">
<a title="" rel="lightbox" href="phpThumb.php?src=galleryimages/gallery_085dee6ab6ce3c73dbdd4249a423da.jpg&w=650&h=550&q=95">
<img src="phpThumb.php?src=galleryimages/gallery_085dee6ab6ce3c73dbdd4249a423da.jpg&w=118&h=118&q=95" border="0"/>
</a>
</td>
<td width="72%" align="left" valign="top">
<table width="80%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td class="protext">Name </td>
<td class="protext01">Golden Sands Apartments </td>
</tr>
<tr>
<td width="31%" class="protext">Type </td>
<td width="69%" class="protext01">Apartments</td>
</tr>
<tr>
<td width="31%" class="protext">Sub Type </td>
<td width="69%" class="protext01">2 BR</td>
</tr>
<tr>
<td class="protext">Location</td>
<td class="protext01">Bur Dubai</td>
</tr>
<tr>
<td class="protext">Rent </td>
<td class="protext01">Dhs. 150,000-180,000 </td>
</tr>
</table>
ASKER
what u mean with table dump?
thank you
thank you
from mysql or php myadmin try to export the table in file and send it
ASKER
Experts-exchange site won't allow me to upload it, so i have uploaded it to free host
http://www.mediafire.com/?sharekey=1b10e01aec70bf7608f8df73f2072ed6e04e75f6e8ebb871
http://www.mediafire.com/?sharekey=1b10e01aec70bf7608f8df73f2072ed6e04e75f6e8ebb871
you can rename it to file.sql.txt ......
i can't get the file
i can't get the file
ASKER
hello, i have uploaded them to different formats hope it work, i uploaded it to my server
ASKER
ASKER
www.chechisrep.com/db sorry
ASKER
omg, sorry i typed it wrong again www.checkhisrep.com/db
they should add edit function in out posts :p
they should add edit function in out posts :p
ASKER
any help please?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you it worked, one thing though how to limit the result lets say 10 and if it was more create another page and it down ( just like any forum software when it gives back results)
you can play with your results and place it in array and echo from this array 10 by 10 ... i think it is easy as long as you ave the right format to show your data
Open in new window