filtering active content on my site with checkboxes?

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
puns0steel
Forum Newbie
Posts: 3
Joined: Wed Apr 30, 2008 6:35 pm

filtering active content on my site with checkboxes?

Post by puns0steel »

I'm working on a portfolio site with about 50 flash SWFs displayed on the same page with no formatting. I'd like to only display the SWFs the user wants to see. Is there a way to filter which SWFs are shown by using check boxes and a submit button? How would that work? Is PHP the right solution?

The filter menu, for example:

_ Print
_ Web
_ Outdoor
_ Misc


Simpler is better, but I can handle some coding.

Thanks!

-Kenny
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: filtering active content on my site with checkboxes?

Post by califdon »

Basically, you could achieve this from several directions. If you want to use exclusively PHP, I'd suggest creating two pages, the first to display the user's choices as checkboxes in a form with a submit button; the second receives the form data and generates the second page, containing the desired elements. Another approach would be to use Ajax (Javascript) to enable interactive selection of elements without reloading the web page. To do that, you'd still need to have a PHP script on the server to receive the Ajax call and return the appropriate data.

In both cases, you'd need to decide how to arrange a variable number of these elements on the page. In other words, how big is each SWF display? Are they all the same size? etc. etc.
Post Reply