Functions:orderExpDateOptions
From Whirlwind eCommerce Wiki
Revision as of 12:43, 23 October 2008 by 71.163.185.8 (Talk) (New page: == Description == Retrievs string of expiration date options to be used in a <SELECT> tag. Typically used in the payment checkout template. == Syntax == $string = eV::orderExpDateOp...)
Description
Retrievs string of expiration date options to be used in a <SELECT> tag. Typically used in the payment checkout template.
Syntax
$string = eV::orderExpDateOptions($expDate=NULL);
Paramaters
- expDate DATE OPTIONAL
- The date to be selected. Must by in DATE string format (ex: 2008-10-08)
Return Values
String of option tags to be placed inside a <SELECT> tag.
Examples
// set a pre selected date for the exp date $expDate = "2008-10-08"; // get the option tags $expDateOptions = eV::orderExpDateOptions($expDate); // output the results in a form echo "<form action=\"index.php\" method=\"post\">"; echo "<select name=\"expDate\">" . $expDateOptions . "</select>"; echo "<input type=\"submit\" value=\"go!\"> echo "</form>";