Forum Moderators: coopster

Message Too Old, No Replies

PHP and HTML

Hundreds of checkboxes

         

mickey5759

4:00 pm on Oct 25, 2009 (gmt 0)

10+ Year Member



Hi I am a newbie to php have used SQL for a year. Question is I need to have an option to print reports by areas and some have hundreds of reports for one area. Code currently has check boxes by each report and it takes a lot of time. Anybody have any ideas where I can get some info for this kind of coding? Thanks this is my first post so if I left anything out that you need please let me know. I have never used one of these sites before. :)

rocknbil

6:42 pm on Oct 25, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome aboard mickey5759, I don't think this question is one related to PHP, it's more of a usability question. I am gathering that by this,

Code currently has check boxes by each report and it takes a lot of time.

You mean it takes a lot of time for the user to scroll through hundreds of entries to find the ones that want to print and check them. It will only get worse if the number of reports increases over time.

I'd re-think the GUI a little bit. Can these reports categorized by type, date, or some other attribute? If so, the solution would be to initially display categories and "drill down" to category specific, never forgetting to include links back to the main category index on all pages.

A second addition that should be in place, some form of basic search by keyword, date, or any other relevant field.

leadegroot

9:29 pm on Oct 25, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



and, the flip side, developing the actual form, *yes* putting these *&^%& forms together always takes forever.
Downside of the trade I fear, its not all fun and coding buzz :(

mickey5759

5:00 pm on Oct 26, 2009 (gmt 0)

10+ Year Member



Thanks so much. You are exactly right about the check boxes. It takes forever now as they have to scroll down and click the ones they want. I really like your answer and will work on that. Seriously thanks so much for the time. :)

rocknbil

5:19 pm on Oct 26, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That being the case, a simple logic is

if (isset($_GET['category'])) {
// lookup entries as you're doing already, restrict to cat in select
}
else {
// here's all you need to add that's new, look up all
// categories, etc. and output the list.
// '<li><a href="reports.php?category='.$row['cat_id'].'">'.$row['catTitle'].'</a></li>';
}

Or you could use a select-one/select-multiple select list, or checkboxes.