Hi there everyone else who is working on Labor Day.
I am trying to find ideas about php query code that will return results that can then be select to continue the program.
There must be a term for this but I just don't have enough history with PHP to know what it is called.
I have an address database, the user enters an address for a look up, if they don't enter the exact address they are out of luck. What I want to do is "if fails" then run a LIKE search and return a list of addresses that might match.
I think I have the code to do the secondary search with the Like and % etc. But I'm stumped with how to display the results in a list that the user can click on and then continue with the program using that address.
We've all seen this on mapquest and superpages when the return other possible address that they have found. That's what I need to accomplish, but don't have any idea of what it is called.
Thanks in advance for any suggestions.
MYSQL search results with choose
Moderator: General Moderators
Re: MYSQL search results with choose
You probably need to use Ajax for this, since you probably don't want to reload the entire page. Ajax is not another language, it is just using Javascript to send what is called an asynchronous request to the server to run a server script that will return some data, which the Javascript will insert into the proper place on the web page without reloading it. Read: http://w3schools.com/ajax/default.asp
Re: MYSQL search results with choose
Thanks Jack..
Wife pulled me away from my office to attend a cookout.
I'll check out your suggestion.
Was hoping to stay with php code...
All the best
Wife pulled me away from my office to attend a cookout.
I'll check out your suggestion.
Was hoping to stay with php code...
All the best
Re: MYSQL search results with choose
You will still use PHP code on the server side, but by the time the user sees your page, it's beyond control of the server, so there is no alternative to using Javascript to detect user actions. The Javascript looks a little daunting at first, but that's only because Internet Explorer browser screwed around with the standards, so you have to test what browser is being used so you can use the appropriate terminology. It's basically boilerplate except for the internal function that determines what to do with the data that's returned by your PHP script on the server.
Re: MYSQL search results with choose
OK, I think I get what you mean. I'll give it a look.
Thanks
Thanks