<?php
if($_GET['action'] == "")
{
echo "<form action=\"".$_SERVER['PHP_SELF']."?action=time\" method=\"post
\" name=\"post\">\n";
echo "<input type=\"text\" name=\"datum\" value=\"DD.MM.YYYY\" onfocus=
\"this.value=''\"> <input type=\"submit\" value=\"send!\">\n";
echo "</form>\n";
}
if($_GET['action'] == "time")
{
$datum = explode(".", $_POST['datum']);
$mktime = mktime(0,0,0,$datum[1],$datum[0],$datum[2]);
echo "<b>Dt. Datum:</b> ".$_POST['datum']."<br>\n";
echo "<b>En. Datum:</b> ".$datum[2]."-".$datum[1]."-".$datum[0]."<br>\n";
echo "<b>UNIX_TIMESTAMP:</b> ".$mktime."<br>\n";
}
?>
|