Hello friends !
Please tell me the coding regarding the submission of the form in PHP without using the submit button.
Just remove the “Submit button”.
I think using the “Enter” key in your keyboard the form will submit.
So what trigger would you use to make the form submit?
I believe return works fine but only for a single input text/string field.
I will try when on the desktop computer.
AFAIK, you need to have a ‘submit’ input field for pressing ‘Enter’ to submit the form. You can, however, hide the submit button using CSS.
Just tried this and it works fine but only with a single input
<?php echo '<pre>$_POST = '; print_r($_POST); echo '</pre>'; $_POST=array(); ?>
<form action='?' method="post">
<div>
<input type='text' name='fred' value='Look Ma, No "SUBMIT"' />
</div>
</form>
Output:
$_POST = Array
(
[fred] => Look Ma, No “SUBMIT”
)
Edit: Just remembered radio buttons also work without a submit button