--- fremaje31 <[EMAIL PROTECTED]> wrote: > I need you all again. I have a event page that search by date but I > want visitors/users to be able to search by date range. I've searched > Google for this but I must be wording it wrong because I'm not getting > the solution. > > Here's the page I'm referring to - > http://mybusinesscircle.startlogic.com/events.php > > I also need a code to drop events once the date has passed. > > Thanks, > > Tisha
You don't say but I guess you are using MySQL? If so, you will want to know about the BETWEEN syntax: SELECT * FROM tablename WHERE datefield BETWEEN startdate AND enddate; The values of startdate would generally be in the YYYY-MM-DD format unless the datefield is a date-time when you'd make the appropriate adjustment. The BETWEEN clause can be used for other data types as well, of course. With this you can do some interesting things from your PHP forms. Typically, each time a PHP/web form is submitted, you will take the input values, validate them, and use them for a SELECT...BETWEEN query. Now, perhaps you want to adjust the display without a page reload. This is more of a topic for a Javascript or AJAX list. However, you can put your values from MySQL into a Javascript array (or a bunch of HTML <div> tags with unique id values) and then use Javascript to affect the display of these elements. As always, the more detail you provide, the more specific and appropriate our answers can be. However, if it is client-side coding, make use of some of the groups where that is their specialty. We are mostly PHP/MySQL here with some other SQL databases making cameo appearances. James