<div class="heading1">
<h3>Search by keyword</h3>
</div>

<div class="items">
<div class="item">

<form method="post">
<input type="text" class="css-input" name="search_key" id="search_key" placeholder="Search here">
<input type="submit" name="search" id="search" class="myButton" value="search" >
</form>
<div class="clear">
</div>   
</div>
</div> 
 This is my search keyword code:
 If I give any keyword it should search and display the particular product. otherwise it should show"no matches found" How to do? with in the page or some other page?
 its urgent

Recommended Answers

All 3 Replies

Create a page which, given a keyword, will search your data set and print the results. Test that until it works. Then, go back to this page and use Ajax to send a POST to the search page with the keyword as parameter. Attach a success handler to the Ajax call so that the data from the search page can be displayed on the current page.

ok. can u give the example code.

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.