Jump to content

Recommended Posts

Hi Guys,

I'm looking for a search tutorial to help me understand how I could explore the possibility of building a search page with fields, such as:

http://jobsearch.monster.co.uk/
http://www.fish4.co.uk/iad/jobs/advanced
http://www.primelocation.com/uk-property-for-sale/

Could anyone point me in the direction of any URLS?

Many Thanks
Link to comment
https://forums.phpfreaks.com/topic/18537-a-search-tutorial/
Share on other sites

I don't have any URLs specifically... but it really comes down to understanding your database and how to use SQL effectively.  If you know those 2 things and how to build a simple HTML form and display the results, then you're all set.  If you don't understand the display part, do a search or look at the tutorials on our main site: www.phpfreaks.com  This has been covered literally hundreds of times.
Link to comment
https://forums.phpfreaks.com/topic/18537-a-search-tutorial/#findComment-79832
Share on other sites

Thanks,

I do understand PHP & Mysql quite well, but I'm not sure about searching a database with conditions.

For example I know how to write a simple php form and output the results back on a page when submit is hit - that's NOT linked to a Mysql database.

But for example, if I had a form and I was searching for a Car ie: 'Seat Ibiza'

i'm not sure how to:

1) Get the form to look in the database and return all results from rows where make='seat_ibiza'.

Then also on these forms there will be other conditions, ie searching for a 'seat ibiza' that is 'red'

2)So I need some kind of tutorial with IF/else statements to show how to achieve something like this.

See what I mean?  Any tutorial links for anything like this will be handy if you could post them please people? In the meantime i'll look through phpfreaks tutorials.

Many Thanks

Chris
Link to comment
https://forums.phpfreaks.com/topic/18537-a-search-tutorial/#findComment-79842
Share on other sites

just make a lil bool isin() function using mid() to automatically check a passage of text for the queried string, i think PhP migh thave such a function built in, but im not quite sure.. if not, it's quite easy to make and seems to me to be self explanitroy, then jus torganise your database in a numerical fassion and use a little for() { } or while() { } loop to search database 1 entry at a time for if(isin(current_cell, $_GET["query"]))


hope this helped... works better and much easier with Ini's than SqL Db's i think
Link to comment
https://forums.phpfreaks.com/topic/18537-a-search-tutorial/#findComment-79873
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.