My simple search form was working but since being split into 2 forms, the keyword field(s) no longer return filtered results. The results page loads with all items on display (no filtering / broken query code). I think this may be due to a field ID error; since the original form is now split into 2 forms, and there are now 2 keyword fields, where as previously there was just one.
// Desired Outcome
When working, the 'keyword' field, once submitted, takes the user's search string and queries it against a data file on the server, populating the search results on the results web page.
// What is Required
Someone with php knowledge, to investigate and resolve.
NOTE: This is not a 'site builder' form or website. This is custom, bespoke HTML, CSS & PHP - hand coded. So please only apply if you have a thorough understanding of the PHP language.
// Additional Info & Background
The primary search form includes a keyword field along with an alternate fieldset (of select inputs, to filter the results by attribute). So 2 methods of search; keyword search & attribute filter search.
As mentioned, the single form has been split so that there are now TWO forms on the initial web page. Both forms contain unique ID 'keyword search' fields, and also the secondary fieldsets with select inputs all have unique IDs.
The keyword search should supersede & take precedence over the select inputs; searching the data file for the keyword string only, and then displaying all matching results.
// Heres the problem
For some reason, neither of the keyword field searches seem to work. And on submit, they show all items in the data file (on the results page), so are clearly not filtering or matching any items to the search string at all.
I think this is because originally the Two search forms were actually One form earlier in time. So there was originally a single Keyword search field, and the two sets of select inputs were also part of the same form. These 'two' search types have now been split off into their own forms, and a second keyword inout was needed.
Both keyword fields have unique IDs and search query data gets passed to the search results page where PHP does the querying against the data file (stored on the sever). But results do not appear filtered at all, so there is an issue, likely with the splitting of the 2 forms, or perhaps more accurate to say; the creation of Two new keyword field ID's, when the original search function was only using a single field ID.
EG: '#keywords' is now; #keywords1 and #keywords2
So perhaps there is some simple error in the PHP which breaks this. I can provide the code for inspection first if needed - but please, any questions, message me and ask!
// The HTML:
<fieldset id="keyword-1-search" class="keyword-search">
<input id="keywords1" class="keywords-field" name="keywords1" type="text" placeholder="Street or keyword">
<fieldset id="keyword-2-search" class="keyword-search">
<input id="keywords2" class="keywords-field" name="keywords2" type="text" placeholder="Street or keyword">
8 freelancere byder i gennemsnit £20 på dette job
hello sir I can solve search issue. we need to change in select query need to add conditions for both search keywords. please text me so we can start work. thanks
Hi, I have more than five years of experience in php development using MySQL codeigniter and cakephp like framework. Also work on core php. Let me resolve your issue fastly. please contact for further information.