Jump to content


  • Posts

  • Joined

  • Last visited


Profile Information

  • Gender
    Not Telling

usman07's Achievements


Member (2/5)



  1. I have created a property website for a client, would like some feedback on it. www.mumtazproperties.hostei.com Thanks
  2. I have a image and I want the image to be inline with the image beside it, iv tried most things but i cant get it to work. The other image beside the filter image are outputted using php. You can have a look here: http://mumtazproperties.hostei.com/forsale.php Heres the css that I have used for the filter image: #filter{ width: 214px; height: 217px; padding-left: 8px; display: inline-table; } heres the css used for the image that are outputted by php: .propimage{ width: 758px; height: 191px; padding-left: 15px; padding-top: 30px; display: inline-table; } Thank you
  3. Thanks so much mate! One last thing, but its just about styling? If you check the link: http://mumtazproperties.hostei.com/forsale.php When you access the page, you see the filter being below, but I want it inline with the first image, then when you select 'detached houses' and the error message comes up, then the filter is where its meant to be?
  4. I added it in the SELECT and it works: $sql= "SELECT p.id, p.url, i.images2 FROM property as p ";
  5. It works mate, thats brilliant! thanks so much. 1 last thing, I want the images to be links just like they was in my other page Iv added it in the echo, is it somehow wrong? Thanks. echo "<a href='{$row['url']}'><img class='image1' src='{$row['images2']}' alt='' /></a><br />";
  6. Ok mate, done that, now the images come up, but how do I get it to work when selecting the links which are filters, at the moment when I select the link e.g. detached houses, the page doesn't exist. Check the link here: http://www.mumtazproperties.hostei.com/forsale.php# Its the bottom 3 images, the top 3 are coded using HTML, which Im going to remove Thanks
  7. Im sorry mate, iv not explained it to you properly i know. Instead of 'categories' shall i put 'images'
  8. It should be: TABLE: property Fields: id market_type housetype TABLE: images Fields: property_id images2 I know iv changed image_path to images2
  9. Yeah mate, sorry here is the php code: <?php $host = ""; //MySQL Database user name. $login = ""; //Password for MySQL. $dbpass = ""; //MySQL Database name. $db = ""; //Make connection to DB try { $dbh = new PDO("mysql:host=mysql10.000webhost.com;dbname=$db", $login, $dbpass); } catch (PDOException $e) { print "Error!: " . $e->getMessage() . "<br/>"; die(); } //Make query. Adjust table/field names as needed. //Basic query for properies for sale $sql= "SELECT p.id, c.image_path FROM property as p "; $sql .= "LEFT JOIN catagorys AS c "; $sql .= "ON "; $sql .= "(c.property_id = p.id) "; $sql .= "WHERE p.market_type='sale'"; //Make array of filter allowed types $types=array("detached","semi-detached","terraced","flats"); //Check for GET and if allowed type if(isset($_GET['housetype']) && in_array($_GET['housetype'], $types)){ //Add filter type to our query $sql .="p.housetype='{$_GET['housetype']}'"; } //Add order by $sql .=" ORDER BY p.id"; //execute query $result = $dbh->query($sql); //get result count $resultcount = $result->rowCount(); //check count for no results if ($resultcount < 1){ echo '<div class="error">Sorry, No Results Match Your Search.</div>'; } while($row = $result->fetch(PDO::FETCH_BOTH)){ echo '<div class="container" style="float:left;">'; echo '<div class="imageholder" style="float:left;">'; echo "<a href='{$row['url']}'><img class='image1' src='{$row['image_path']}' alt='{$row['summary']}' /></a> <br />"; echo '</div>'; echo '<div class="textholder" style="font-family:helvetica; font-size:14px; float:left; padding-top:10px;">'; echo "{$row['summary']}"; echo "<span style=\"color:#63be21;\"><br><br><b>{$row['bedrooms']} bedroom(s) {$row['bathrooms']} bathroom(s) {$row['receptions']} reception room(s)</b></span>"; if($row['parking'] != null){ echo "<span style=\"color:#63be21;\"><b> {$row['parking']} parking space(s)</b></span>"; echo '<div class="sline"><img src="cutouts/search/sline.png" alt=""/></div>'; } echo '</div>'; echo '<div style="clear:both"></div>'; } ?>
  10. I'm still getting the same error? Fatal error: Call to a member function rowCount() on a non-object in /home/a2221438/public_html/forsale.php on line 101
  11. Hello Drummin, Basically what I want is for the search filter to check information from the properties table for and check the ID's to see what type of property it is e.g. detached, semi detached etc, then output an image from that? I don't need any other fields, like the bedroom bathrooms etc and all of them.
  12. the area_name is not in the catagorys table but in the locations table. I actually don't want any of these entries in anyways, from the database I just want images to appear depended on if the property is detached, semi detached, etc.
  13. I get this error? Fatal error: Call to a member function rowCount() on a non-object in /home/a2221438/public_html/forsale.php on line 102 This is line 102: $result = $dbh->query($sql); and below this is the row count: $resultcount = $result->rowCount(); //check count for no results if ($resultcount < 1){
  14. I was just looking back at the insert.php page, and that doesn't have a $sql= "SELECT * FROM property WHERE market_type='Sale'"; so it doesnt select from a certain table, so if we just removed that, would that make any sense? I have absolutely no clue to what i'm saying is right or wrong. or how about using something like this: $qry = $sql->sqlStart.$sql->stmt.'Group By property.id'; $results = mysql_query($qry) or die (mysql_error()."<br />|-|-|-|-|-|-|-|-|-|-|-|-<br />$qry");
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.