Php Real Estate Search

Hi,

I am looking to implement a search function into my real estate website that will allow users to select criteria which will then display results that meet the criteria. For example, a user selects a maximum price and the all houses within that price will be displayed on the results page.

So far, I have created the MySQL database but I am a complete novice when it comes to php. Are there any scripts available online that do a similar thing?

Many Thanks

Well there are TONS of ways to do this. First, if you already have your site up and running and displaying properties, the easiest way is to have radio buttons or drop downs that allow for the choices of user options. Then, using those settings, you create a query to select the correct properties from your database.

If you have a certain PHP question ask away… (Or any question, we are not picky, LOL…)

Hi,

Thanks for the reply. I have the site fully up and running and it contains all of the properties to be search. The drop down and radio buttons is exactly what I’m looking for, but the I’m not sure where to begin with writing the php code! I would also need the search results to display formatted, containing images and descriptions of the properties rather than a straight forward list.

Thanks

Well, you can do a full database search using keywords. You would do this with queries.
something like “SELECT * from Properties WHERE Rooms=3 AND Area > 3acres”…
Of course, this is just a sample. Here is a site that lays out the idea for a database search.
Might help: http://www.emirplicanic.com/php/php-mysql-search-script

There are so many ways to do searches on a database. The main problem is WHAT do you want to search and WHAT are you searching for. Before you can code, you need to make a plan.

  1. Make a list of your database fields that you need to search.
  2. Under each field, list samples of what you want to look for in these fields.
  3. Next to these samples, list how you want to allow the user to enter the search criteria
  4. Now, you can start your coding, first creating your user-input fields (drop-downs, text fields)
  5. With the user-inputs set up, you can program how each input is used to search the DB with.

Okay, now you have the general layout of your project, step by step. Start it off and when you are stuck come back and ask your next help question… Good luck…

Sponsor our Newsletter | Privacy Policy | Terms of Service