PHP search form to manipulate for loop?

jasgrey

Junior Member
Joined
May 27, 2014
Messages
166
Reaction score
240
I'm very novice in PHP. But I know what I need to do with my site that I'm building, I just can't do it myself. I don't even know if it's possible, so I was hoping someone could drop me some advice.

I have a page that I'm building that is like a gallery of pictures. These pictures have hover effects, etc. Clicking them initiates a JavaScropt pop-up focus page thing. But, what I really need to do with this page is have a search bar at the top, and depending on the selections in the search form, it would initiate a PHP for loop that would only show results based on the criteria.

How can you use a search form to manipulate the output of a for loop? This is the question.
 
Assuming your gallery entries are stored in a database, pass the search terms via an AJAX request to a PHP script which will generate the filtered results and display them.
 
Back
Top