Hi everyone,
I need a bit of guidance on a particular problem:

A client of mine wants a search functionality added to his site. The site would have a form which when submitted would display a list of results. The client would also need to update the site himself.

I only know CSS & XHTML and was wondering if anyone could guide me into whats the best approach in creating a solution for this problem; either being using a particular script, language of using a cms like joomla.


Thanks!

Ryan

Dani AI

Generated

Useful roadmap and practical tips that build on the replies from , and .

Start by modelling listings for the filters you need: categorical fields (type, status), numeric ranges (price), and a geolocation (lat/lon). Normalize small lookup lists (types, suburbs) so the UI can show friendly labels and counts. Index the columns you filter on and add a spatial index for geo queries. Keep audit fields (created_at, updated_at, soft_delete) so edits are reversible.

A minimal example (pseudo-SQL) to illustrate indexing and a parameterized search:

CREATE INDEX idx_props_filters ON properties(property_type, status, price);

-- parameterized search (pseudo)
SELECT id,title,price,ST_X(location) AS lng,ST_Y(location) AS lat
FROM properties
WHERE property_type = ?
  AND status = ?
  AND price BETWEEN ? AND ?
  AND ST_DWithin(location, ST_Point(?, ?), ?)
ORDER BY created_at DESC
LIMIT ? OFFSET ?

On the UI side, make filters obvious and tolerant: two numeric inputs for min/max price (with an accessible slider fallback), a location autocomplete that geocodes input to lat/lon, a clear sale/rent toggle, and visible result counts. Use faceted search patterns so the user can refine results progressively; choose pagination or "load more" based on expected result size (see faceted-search and pagination guidance). For location autocomplete, consider a geocoding/place API to avoid fuzzy text-matching.

For the client-edit experience, build a small CRUD admin area with CSV import/export, image upload (validated and resized), and simple help text. Do not give nontechnical clients direct DB tools. Enforce server-side validation and use parameterized queries to prevent injection (see OWASP on injection); complement with client-side validation for better UX (see MDN forms).

A practical first milestone: design schema + seed data, implement a single search endpoint with paging, build the public form and results page, then add the admin CRUD and extra UX (map view, saved searches) after that. Useful references: NN/g on faceted search (), Google Places for autocomplete (https://developers.google.com/maps/documentation/places/web-service/overview), OWASP on injection prevention (), MDN on form validation (https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation).

Recommended Answers

All 8 Replies

The first question you need to answer is what are you searching - records in a database or the website itself?

The first question you need to answer is what are you searching - records in a database or the website itself?

Hi There,
Its a a real estate website so it will need to search a database.

The only fields needed are:

  • Property Type
  • Price Range
  • Location
  • Tolet/Sale

I have some knowledge in sql server (creating tables, normalization)
What will be my best language to learn?

Thank you.
Ryan

Your best bet - since it's going to be online - php with mySQL. Chances are your client's host has that available. There are lots of tutorials out there. Shouldn't be that difficult if you already have some knowledge of setting up and accessing databases.

Great. Thank you for the guidance, Ill start researching php now. One last small question.... what can the client use to update the db from his end?

Thanks

1) Either you can create adminpanel for him where you create php pages (that will manage database)
2) your client directly make changes to database using available tools like phpmyadmin for mysql(this is dangerous if client is IT illiterate)

When dealing with clients who may be DB illiterate, it's not that more difficult to create a form that will read the database and allow the client to edit it. You can set the form up with as much tutorial info you think they need.

For my clients I put the admin stuff in a password protected directory. (and then they call me to do the updates since the password screen is so scary. LOL)

Perfect. Ill start my research and let you guys know the progress! Really want to accomplish this. Might be easy for some but id love to get something like this work and build up on it.

Thanks everyone.
Ryan

You learn by doing - I was terrified of PHP (Perl is logical, right...? LOL) Then I got a client with a host with non-existent cgi-bin support but with PHO and mySQL... I now do PHP.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.