Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder
    Join Date
    May 2006
    Thanked 4 Times in 4 Posts

    Constructing a classification selection page


    I want to have a form where a user can select 3 classifications
    from an automatically generated list of categories.

    There will be about 50 categories to begin with and then later probably a max of 200.

    I was going to just use 3 normal html drop-down boxes, but with this number of items it will be too cumbersome.

    So I want to set up single page and list the categories in alphabetical order, each with a tick box next to it and request the user to tick up to 3 boxes.

    assuming I have a MySQL table called cats,

    I can display them with:

    PHP Code:
    $sql "SELECT * FROM cats ORDER BY cat_id";
    $result mysql_query($sql) or die("could not lists CATS"mysql_error() );  
    while (
    $row mysql_fetch_assoc($result)) {
    But how would have a tick box next to each category and then collect the data ?

    Thanks for any suggestions.

    If you want to attract and keep more clients, then offer great customer support.

    Support-Focus.com. automates the process and gives you a trust seal to place on your website.
    I recommend that you at least take the 30 day free trial.

  2. #2
    Master Coder sunfighter's Avatar
    Join Date
    Jan 2011
    Thanked 997 Times in 994 Posts
    Yeah, give up the "you can select 3 classifications " idea. It's just a big head ache that adds nothing to your site.

    I'd put a simple "Choose another classification" button on your pages that does an automatic redisplay of the first or the Classification Page so they can pick another one.

    Make the button colorful predominant and position:fixed;


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts