PHP Classes

File: combobox_example.php

Recommend this page to a friend!
  Classes of juergen kaucher   datecombobox   combobox_example.php   Download  
File: combobox_example.php
Role: Example script
Content type: text/plain
Description: exampel to combobox.class
Class: datecombobox
Creates a combobox with day, month and year
Author: By
Last change: blanco combobox with the value 00.00.0000 for non specific date (thanks to Richard Sharpe for the idea)
now it is necessarily to put 'today' into the $value field for getting the actual date
if the $value field is empty you will get 00.00.0000
Date: 22 years ago
Size: 767 bytes
 

Contents

Class file image Download
<?php
include_once("combobox.class.php");

$today = 'today';
$mybirthday = '2002-06-04';

// make combobox with no date (00-00-0000) and without a name (only '_d', '_m', '_y')
$combobox = new combobox('', '');
echo
"<br><br>";

// make combobox with actual date and without a name (only '_d', '_m', '_y')
$combobox = new combobox('', 'today');
echo
"<br><br>";

// make combobox with my birthday's date and name mybirthday
$combobox = new combobox(mybirthday, $mybirthday);
echo
"<br><br>";

// make combobox with my birthday's date and the name today
$combobox = new combobox($today, $mybirthday);
echo
"<br><br>";

// make combobox with date 2002-11-09 and name fixday
$combobox = new combobox(fixday, '2002-11-23');
echo
"<br><br><br>";
?>