Jump to content

Trying to make a row field searchable(state location in this case)


Recommended Posts

Hi,

 

As title reads I am looking for a way to make the state field name searchable, even by way of a url

example: www.site.com/index.php?page=home&state=victoria

 

The directory script software I got has a home page with a seach box where you select your state from a drop down, hit search and then it narrows down the results and shows the number of the results next to the categories "dogs(2)", but I am trying to find a way that I can create a link directly to a page which displays the records from that state, the idea behind it is to create more links for SEO purposes.

 

If anyone could shed light on how I could do this or how I could figure out how I'd be greatly appreciative.

Thank you for responding, my problem is I'm not sure how I would target the URL to filter (by location in this case).

 

I can do www.site.com/index.php?page=home&category=1

 

And it will list all the results in category 1, i've tried location=victoria, location=2(the id of the state in the mysql database)

 

I just don't know where to look to troubleshoot if this is possible(sorry I am very new to php so my terminology isn't the best).

 

I can provide information from the mysql database if required, I just don't know what info is required.

Just an update, the software providers got back to me and said for this function to be available I'll need to pay an "additional feature" fee :(

 

EDIT:

 

Just got an e-mail back..

 

"If you want to do it yourself, I can tell you as much as, you would need to do a MySQL query which loops through the database and pulls out results based on the listing owner, then you would need to output those results into the HTML.

 

Search for MySQL queries and how to get records out of a database with PHP.If you want to do it yourself, I can tell you as much as, you would need to do a MySQL query which loops through the database and pulls out results based on the listing owner, then you would need to output those results into the HTML.

 

Search for MySQL queries and how to get records out of a database with PHP."

 

So I guess I'll start there, so for wasting any readers time by not understanding the terminology enough to ask the right questions.

Edited by Jdog

i've tried location=victoria, location=2(the id of the state in the mysql database)

 

 

Which one you use will depend on what the table you want to search contains, the name or the id. (If designed properly it should be the id).

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.