code to search everything
2 posts by 2 authors in: Forums > CMS Builder
Last Post: May 5, 2011 (RSS)
By dccreatives - May 5, 2011
I am trying to make a keyword search. How to I have the form action search everything.
This is the code I am using:
<form method="post" action="search.php">
<input name="name" type="text" value="" class="field" id="search" />
<input name="submit" type="image" value="SUBMIT FORM" src="images/button-go.jpg" border="0">
</form>
It only returns the name of one on my tables when entered exactly. I have 'name' in numerous categories. I want it to return every instance of where it finds the keyword.
Please advise.
This is the code I am using:
<form method="post" action="search.php">
<input name="name" type="text" value="" class="field" id="search" />
<input name="submit" type="image" value="SUBMIT FORM" src="images/button-go.jpg" border="0">
</form>
It only returns the name of one on my tables when entered exactly. I have 'name' in numerous categories. I want it to return every instance of where it finds the keyword.
Please advise.
Re: [dccreatives] code to search everything
By Jason - May 5, 2011
Hi,
Try changing your form field to this:
This will search our table to find an instance of what you entered somewhere in the field "name"
Is this what you're looking for?
Hope this helps.
Try changing your form field to this:
<input name="name_keyword" type="text" value="" class="field" id="search" />
This will search our table to find an instance of what you entered somewhere in the field "name"
Is this what you're looking for?
Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/