homer.favenir Posted June 26, 2008 Share Posted June 26, 2008 hi, can anyone please tell me how to get the current time using checkbox or radiobutton? my code is <form action= "<?php $_SERVER['PHPSELF'] ?>" method="post" enctype="multipart/form-data" name="formtime"> <input name="start" type="text" id="start" readonly="readonly" value="<?php echo $_POST['time']; ?>"/> <input name="time" type="checkbox" onClick="GiveDateTime()" value="checkbox" id="time" /> </form> <?php echo $_post['time']; ?> the input text should output the current time when the checkbox is checked. please thanks Link to comment https://forums.phpfreaks.com/topic/112014-solved-get-current-time/ Share on other sites More sharing options...
Wolphie Posted June 26, 2008 Share Posted June 26, 2008 date("g:ia"); // Example: 10:56am Link to comment https://forums.phpfreaks.com/topic/112014-solved-get-current-time/#findComment-574973 Share on other sites More sharing options...
homer.favenir Posted June 26, 2008 Author Share Posted June 26, 2008 thanks! Link to comment https://forums.phpfreaks.com/topic/112014-solved-get-current-time/#findComment-574979 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.