PHParadise source code of “datepicker” in category “forms”
PHParadise
>
forms
> datepicker
this will generate a form to choose a date
back to the download options
see PHP code for “datepicker”
see demo of “datepicker”
copy the code of forms / datepicker
click here to select all the code
<?php /*------------------------------------------------------------------------------ | | PHParadise source code | |------------------------------------------------------------------------------- | | file: datepicker | category: forms | | last modified: Sat, 02 Sep 2006 15:24:06 GMT | downloaded: Sun, 05 Feb 2012 13:44:55 GMT as copy from textarea | | code URL: | http://phparadise.de/php-code/forms/datepicker/ | | description: | this will generate a form to choose a date | ------------------------------------------------------------------------------*/ echo ' <p>date picker</p>'; // create the form echo ' <form method="post" action="./"> <select name="month"> <option>please choose a month</option>'; // create the month pull-down menu $month = 1; while($month <= 12) { $monthname = date('F', mktime(0,0,0,$month)); echo ' <option value="'.$month.'">'.$monthname.'</option>'; $month++; } echo ' </select> <select name="day"> <option>please choose the day</option>'; // create the day pull-down menu. $day = 1; while($day <= 31) { echo ' <option value="'.$day.'">'.$day.'</option>'; $day++; } echo ' </select> <select name="year"> <option>please choose a year</option>'; // create the year pull-down menu. $year = date('Y'); $last_year = $year + 10; while($year <= $last_year) { echo ' <option value="'.$year.'">'.$year.'</option>'; $year++; } echo ' </select> <input type="submit" value="submit" /> </form>'; // example output if(isset($_POST['month']) && is_numeric($_POST['month']) && isset($_POST['day']) && is_numeric($_POST['day']) && isset($_POST['year']) && is_numeric($_POST['year'])) { $day = $_POST['day']; $month = $_POST['month']; $year = $_POST['year']; echo ' <p>you selected '.date('l, F \t\he jS Y', mktime(0,0,1,$month,$day,$year)).'.</p>'; } ?>
array handling
array multi sort
entries per row
complex array sort
communication
send email
databases
mySQL class
mySQL to excel
date and time
date and time
date examples
loading time
remote last modified
timestamp to time passed
directories
directory list with exec
htaccess 2
htaccess
human readable size
read dir and list
recursive directory delete
recursive directory listing
recursive make directory
directory structure to list
file handling
delete file
download counter
file exists
file informations
file upload
include secure
line by line
open file
read and select csv
read file
strip file extension
write to file
write to first line of file
forms
datepicker
google results
keep selected combobox
simple calculator
html and code
alternate row colors
convert html
extract vars
floating div
force PHP in HTML
get offsite code
html entities
html head
meta tags
prime numbers
simple bar chart
simple php code highlight
view php source
image editing
analog GD clock
colorizing
crop image
grayscale an image
image rotate
outlining
shadowing
textures
translucent text
invert image
image handling
base64 image encode
image upload and resize
list image folder
resize offsite image
information
detect user language
domaincheck
google position
phpinfo
referer info
server variables
visitor IP
visitors online
sessions and co
basic authorization
sessions class
string handling
autolink
extract string from offsite
insert at specific location
number to words
string compare
string in string
string replace
string to columns
substring examples
summarize article