0
I have on my page a form (form) with an already determined action and an input button.
<form id="educForm1" name="educForm1" action="<?php echo ROOT . 'educacao' ?>/enviaemail" method="post" enctype="multipart/form-data">
...
<input id="enviaEmail" name="enviaEmail" type="submit" class="textDescricaoSobre font13" value="Criar Evento" style="cursor: pointer; width: 90px;" />
</form>
By pressing this sent Mail button, it should save the form data to the database table and automatically send an email with the recorded data.
I would like to put a second Ubmit, which only sent the e-mail and did not record in the bank. The first Ubmit would only save the data, but should not refresh the page in the action (action=php echo ROOT . 'education' /enviaemail).
What could I do? Change the action? Put button instead of input? I’m open to suggestions.
Voce would have to handle the submissions via javascript, making each button call a function
– Daniel Costa
You can use the same Ubmit with a checkbox indicating whether or not to save the information to the database.
– rray