I need php function that works after html button is visible. When you click twice in succession with these codes, the sonsion is called twice.
<button id="btnsubmit" name="submit" <?php echo isset($_POST["btnsubmit"]) ? "disabled" : "";?>>submit</button>
<?php
if (isset($_POST['submit'])) {
date();
}
function date(){
print(date('Y-m-d H:i:s', time()));
}
?>