#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2009
    Posts
    667
    Rep Power
    6

    Month drop-down, multi-year?


    Howdy y'all. I guess I'm just looking for some thought/ideas on how to go about this. When I originally wrote this script, I have the month drop-down to pick what bills to see. I wasn't thinking of how to manage things come a new year.

    Two ideas I have is make a second drop-down hold the year, or allow the single drop-down to hold items similar to Month - Year. I don't intend on holding a long history, and will probably edit the script to expire/remove items after 1 years time.

    Just lookin' for peoples thoughts/input on what I should end up doing. Thanks in advance.

    Page: http://www.hellzoneinc.com/bills.php
    Script: http://www.hellzoneinc.com/bills.txt
  2. #2
  3. Come play with me!
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,749
    Rep Power
    9397
    Both sound reasonable, and as for which it depends on how you're using the dropdown(s). Still not quite sure about that.

    If the list is chronological then "Month - Year" would make sense: down the list is going one way in time, up the list is going the other way. It's putting two pieces of information in one field, generally a no-no, but I think it's fine for this.

    If the list is like a filter then one for year and one for month makes more sense: you're not so much scrolling through time as it is you're picking a specific month to look at. Makes the programming easier too.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2009
    Posts
    667
    Rep Power
    6
    Mostly referenced to view current months bills, but I figured since I'd be storing via a database, then might as well offer history browsing.
    I'm thinking, since most bills are exactly the same every month, to create an if/then that will execute first time page is viewed each month to remove all bills from that month the previous year, and create the current months initials bills. This way nothing should overlap, and upon page arrival, the user is always arriving at current month.

    One other thing I'd have to figure out would be changing it so January comes AFTER December on the drop-down list so months are accurate in that manner. It won't matter ASC/DESC.

    Example: (Current date being August 20, 2013)
    September - 2012
    October - 2012
    November - 2012
    December - 2012
    January - 2013
    February - 2013
    March - 2013
    April - 2013
    May - 2013
    June - 2013
    July - 2013
    August - 2013

    I'm hoping it would just be a simple edit in that loop creating the drop-down options. *crosses fingers* ^_^

IMN logo majestic logo threadwatch logo seochat tools logo