gem0670 Posted April 7, 2009 Share Posted April 7, 2009 I have a database of properties for a residential rentals website. I am trying to highlight specific properties as a Highlighted property. What i would like to do is when there is yes is the 'highlighted property' field in the MySQL database some text is displayed above the property stating that it is featured and maybe a 3px blue border is added to the photo. Can anyone help or direct me to a howto article. As i am sure you have guessed I am very new to this and totally self taught (or un-taught may be a better description). You can view the link to the page I am talking about below please add the w's (Do not want google to show this thread when my company name is searched for). key-services.co.uk/Cyprus_Residential_Lettings.php Thank you guys in advance for your help Gemma. Quote Link to comment Share on other sites More sharing options...
Yesideez Posted April 7, 2009 Share Posted April 7, 2009 Welcome! If (as you say) there's a field called "highlight" in the database (maybe an ENUM with the values 'yes' and 'no') you can check when the property is viewed. Let's say the query to pull the property from the database is something like this: $row=mysql_fetch_assoc(mysql_query("SELECT * FROM properties WHERE propertyid=".$id.")); We can check the highlight field like this: if ($row['highlight']=='yes') { Then as we build the HTML part of the page we can switch back to PHP and add any extras just by using the if() statement as shown above to add any extra text/styles. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.