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 Quote Link to comment Share on other sites More sharing options...
Wolphie Posted June 26, 2008 Share Posted June 26, 2008 date("g:ia"); // Example: 10:56am Quote Link to comment Share on other sites More sharing options...
homer.favenir Posted June 26, 2008 Author Share Posted June 26, 2008 thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.