> > > What are your suggestions folks on how to go about setting a date on a
> > > so that a user can not set a start date prior to the current days date?
> > > validation I should be dealing with, basically as it is I have a form
> and a
> > > user can select a start date, but they should not be able to select a
> > > that is past, currently the start date form is a drop down (a very long
> > > down) I would like to use one of those nifty calendar popups but am not
> > > (aka..wasn't able to figure out) how to send the date to the db fields
> > > they are...
> > > guidance on this would be great ..how would you do it?
> > > thanks guys and gals
> > > Terion
> > Broadly, you're either going to have to limit their choices going in to
> > the form (limit the choices in the drop-down box), or validate it
> > afterwards and generate an error message if it's wrong.
> > except maybe for Ashley's (mentioned in another thread). And even at
> > that, a PHP one won't be selectable the way you want unless you put
> > radio buttons next to all the dates. And after all that, you'd still
> > have to do some pre-processing of it to limit selections to current date
> > and later.
> > Paul
> > --
> > Paul M. Foster
> What about just accepting any date in to the system, and defaulting to
> the current date if any numptys/users try to set one before?
> Do something maybe like this (untested)
> $userDate = strtotime($_REQUEST['date']);
> $startDate = ($userDate < time())?time():$userDate;
> >From there, you can use the timestamp how you wish.
> OOH found it:
> $startday = mktime(0, 0, 0, date("m") , date("d")+2, date("Y"));
> Well no, guess I didn't find it because that code above gives me
> this 1235109600
> What is that??