note 14343 deleted from function.mktime by hholzgra
| From: | hholzgra@php.net | Date: | Sun, 14 Apr 2002 22:08:52 +0000 |
| Subject: | note 14343 deleted from function.mktime by hholzgra | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-29326@lists.php.net to get a copy of this message | ||
An actual working script to convert your times and dates to tstamps. very simple. very easy
----
<form action="<?print $PHP_SELF?>" method="post"
name="TStamp">
<table width="300" cellpadding="5">
<tr>
<td width="200">Day Number :</td>
<td width="100"><input type="text" name="day"
size="2" maxsize="2"></td>
</tr>
<tr>
<td width="200">Month Number :</td>
<td width="100"><input type="text" name="month"
size="2" maxsize="2"></td>
</tr>
<tr>
<td width="200">Year Number :</td>
<td width="100"><input type="text" name="year"
size="4" maxsize="4"></td>
</tr>
</table>
<br><br>
<input type="submit" name="submit" value="Submit">
</form>
<br><br>
<?
if ($submit) {
$date = mktime(0,0,0,$month,$day,$year);
if ($date == "-1") {
print "Invalid Date";
} else {
print "Timestamp: $date";
}
}
?>