Is there anyone here tell me how to create php auto suggest box from database using mojave linux?Thanks

Recommended Answers

All 3 Replies

Your post is a bit... vague, to put it lightly.
what do you mean by an auto suggest box? a dropdown with a preselected value? a list with a suggestion beneath it?

Your OS shouldn't matter, as long as it has some sort of webserver supporting PHP and -any- database.

a dropdown list of name from database!for example i entered letter "A" from a box then all name from database starts with letter A will appear dropdown

You could try using AJAX for that, i can't explain the technique out of the top of my head, but i'm sure you could find something using google (just make sure you get the coding technique, not the dutch soccer group :P)

It is, simpy put, a combination of Javascript and any server-side language, like PHP.
It works OS-independent.

You can use JScript to get the value from your box(where you type the 'A'), then pass it through AJAX into a php file, which uses it to fuel an SQL query ("SELECT * FROM blablabla WHERE NAME LIKE <your letter A>% ") and then use AJAX and JScript to write the result in any HTML page.

There's more info about AJAX here: http://www.w3schools.com/ajax/default.asp
And more info about LIKE here: http://ask.sqlservercentral.com/questions/3095/sql-statement-to-retrieve-names-beginning-with-a-or-s-or-z

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.