Jump to content

Date in php & HTML form


houssam_ballout

Recommended Posts

Hello,I am creating html form in which user fills in data, the user will also insert date, then on another page the user will read the same date in the same format.I need help how to put like calendar (which is easy to select from), then when I echo that field from the database, it will display the date that he/she selects.Thanks in advance

Link to comment
Share on other sites

Pretty simple really.Use a Javascript calender to select the date - this will then insert the date into the form. Theres one that uses jQuery that lets you select the format of the date too - http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/ I use this in a site I maintain and its really good.Then that value is inserted into the database when the form is submitted (best to check the values though that they are what they should be, such as a pre-determined pattern, like dd-mm-yyyy in case someone is been a bit naughty on the site and trying to hack it).Then on the other page, you simply fetch that database value.And thats all there is to it :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...