balufreak
Aktives Mitglied
Thread Starter
- Dabei seit
- 12.10.2003
- Beiträge
- 1.563
- Reaktionspunkte
- 28
PHP:
<?
echo '<html>' .
'<head>' .
'<title>Timestamp Generator</title>' .
'</head>' .
'<body>' .
'<form name="date" action="'.$PHP_SELF.'" method="post">' .
'<center>' .
'<p><select name="h">';
for($i=0; $i<=23; $i++)
{
echo '<option value=""'.$i.'">'.$i.'</option>';
}
echo'</select><select name="m">';
for($i=0; $i<=59; $i++)
{
echo'<option value="'.$i.'">'.$i.'</option>';
}
echo'</select><select name="sec">';
for($i=0; $i<=59; $i++)
{
echo'<option value"'.$i.'">'.$i.'</option>';
}
echo'</select><select name="month">';
for($i=1; $i<=12; $i++)
{
echo'<option value="'.$i.'">'.$i.'</option>';
}
echo'</select><select name="day">';
for($i=1;$i<=31; $i++)
{
echo'<option value="'.$i.'">'.$i.'</option>';
}
echo'</select><select name="year>">';
for($i=2000;$i<=2010; $i++)
{
echo'<option value="'.$i.'">'.$i.'</option>';
}
echo'</select>';
echo'<br/><input type="submit" value="Generate"></p>' .
'</form>';
if(isset($_POST['h']))
{
$h = $_POST['h'];
$m = $_POST['m'];
$sec = $_POST['sec'];
$month = $_POST['month'];
$day = $_POST['day'];
$year = $_POST['year'];
echo'<p>Your Timestamp:'.mktime($h,$m,$sec,$month,$day,$year).'</p>';
}
echo '</body>' .
'</html>';
?>
Dieser Code gibt mir immer einen falschen timestamp zurück. Warum?