PHP interesse |
|
<?php
if($_POST['submit']) {
echo 'Hij doet het!'; //Form dus hier
} else {
//Als ik op verzend klik blijft hij hier!
echo '<form action="?page=test" method="post" name="form" onsubmit="document.forms.form.submit.disabled=\'true\'; return true;">
<table>
<tr><td>Input</td><td><input name="input" type="text"></td></tr>
<tr><td> </td><td><input name="submit" type="submit" value="Verzenden"></td></tr>
</table>
</form>';
}
?>
<?php if($_POST['submit']) { echo 'Hij doet het!'; //Form dus hier } else { //Als ik op verzend klik blijft hij hier! echo '<form action="?page=test" method="post" name="form" onsubmit="document.forms.form.submit.disabled=\'true\ '; return true;"> <table> <tr><td>Input</td><td><input name="input" type="text"></td></tr> <tr><td> </td><td><input name="submit" type="submit" value="Verzenden"></td></tr> </table> </form>'; } ?>
Ontani edit: Code tags nie vergeten! |