Insert a unique ID into a form : md5 « Utility Function « PHP
- PHP
- Utility Function
- md5
Insert a unique ID into a form
<form method="post" action="<?php echo $_SERVER['SCRIPT_NAME'] ?>"
onsubmit="document.getElementById('submit-button').disabled = true;">
<!-- insert all the normal form elements you need -->
<input type='hidden' name='token' value='<?php echo md5(uniqid()) ?>'/>
<input type='submit' value='Save Data' id='submit-button'/>
</form>
Related examples in the same category