is anybody knows how i can get time(system),when i clicks on button(now)
<?
function fillDD($min, $max, $selected)
{
for($i=$min; $i<24; $i++) {
$i = sprintf('%02d', $i);
for($j=$max; $j<60; $j+=5) {
$j = sprintf('%02d', $j);
if($i == $selected && $j == $selected) {
print("<option SELECTED value='$i:$j'>$i:$j</option>\n");
}
else {
print("<option value='$i:$j'>$i:$j</option>\n");
}
}//for($j)
} //for($i)
}
?>
<td>
<select name="time" size="1">
<? fillDD(0, 0, -1); ?>
<input type="button" size="1" name="now">
</select>
</td>
is it possible with PHP that when i click this button i will get system time in this select field
thanks so how i can use javascript so that when i click on button system will dispay on select field i can call the function on this button now but it will show soem alert i just want to display in select field when this button is clicked as i have seen some websites they r using button to get present time
var now = new Date();
function a(){
alert(now.getHours()+":"+now.getMinutes()+":"+now.getSeconds());
}
i will really appreciate if you provide the solution
Bookmarks