PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have an event calendar. It shows the events of month, date etc. but it shows the events for all year (previous and also past). For example, if i add an event from apr 1 to apr 10 2007 . It shows that event for any year we select. I think, its not taking year to consideration. Pls help me out.
Rather than selecting all the events in the database and then checking each one to see if you should display it, you ought to just select the events that will be displayed. Your current system is hopelessly unscalable. If you have 10,000 events in the database it'll be incredibly slow.
Also, the line "$month = abs($months);" would concern me. Why on Earth would you be sending a negative value for the month?
And, "DAY- starting date, DAY1-ending date" .. why aren't they called something like start_date and end_date? Cryptic column names will be a problem for whoever has to maintain the code.