Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calender date picker - PHP

Status
Not open for further replies.

WilliamMute007

Programmer
Sep 30, 2007
116
GB
Hi,

I am trying to implement a calender feature on a website which allows user to pick a date on the calender and the DB is queried. I am lost for direction, can any please help with some directions? I've searched google and I get a lot of junks but nothing meaningful really...

Any help?


Thanks in advance
 
The Calendar Picker will have to be either Javascript based or HTML based as PHP cannot do it.


The JS picker should just populate a text box with the selected date, and then you can either submit the form using JS or wait for the user to press he submit button. In either case the form is submitted to a PHP script that uses the date to query the Db and returns the
results.

If you choose to go the HTML way, you can use PHP to create the calendar and have each day be a link that looks something like:

<a href="phpscript.php?myvalue=xx-xx-xxxx>Date</a>

Once its clicked it sends the value to the PHP script and it queries the DB using the value.




----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Thanks for your response guys... John, am going to try out the one on the link that you send. Will let you know if its successful.

Thanks once again to you both!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top