Hello everyone,

I have a database it has 4 columns: id, name, description, cure.

I want to be able to type in the name of something into the search bar and for it to show the the result below using ajax/jquery.

in php it would be like, select * where `name` = $_POST

and if it doesn't match the EXACT name, then to show a message saying 'no results'

Get what i mean?

heres the image

it needs to also pull the information from description column into the textarea aswell as displaying the cure column.

Cheers

Member Avatar for Member #120589

query
check results
if no results - echo "no results"
if results - echo description and cure fields.

You've almost got the code right there. Search the php manual for:

mysql_num_rows()

Either that or show us your code so far and you may get some more help.

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.