Answer the question
In order to leave comments, you need to log in
How to send the result of javascript code to your mail?
There is a test with checkboxes that: fully works and shows results. But how to display the result of js code in the mail? I only know that php is needed. Can you send material on this topic or explain in your own words how to do it?
<form method="$_GET" action="action_handler.php" id="form">
<section class="table_1">
<table class="iksweb" name="checkbox">
<tbody>
<tr>
<td rowspan="3"><b>История компании «Mc donald's»</b>
<h3 class="the">Кто основал компанию «Mc donald's»?</h3>
<section class="conteiner">
<div class="checkbox">
<input type="checkbox" class="i-6" id="i6" value="0" name="formDoor[]">
<label for="i6" tabindex="12">Роналд Макдоналд</label>
</div>
<div class="checkbox">
<input type="checkbox" class="i-6" id="i7" value="0" name="formDoor[]">
<label for="i7" tabindex="13">Рэй Крок</label>
</div>
<div class="checkbox">
<input type="checkbox" class="i-6" id="checkbox_68" value="1" name="formDoor[]">
<label for="checkbox_68" tabindex="14">Братья Дик и Мак Макдоналд</label>
</div>
<div class="checkbox">
<input type="checkbox" class="i-6" id="checkbox_170" value="0" name="formDoor[]">
<label for="checkbox_170" tabindex="14">Клинт Иствуд</label>
</div>
<div class="out-block out-6"></div>
</section>
</td>
</tr>
</tbody>
</table>
</section>
<div class="dsw">
<button class="b-6" tabindex="11" id="btn-1" type="submit" name="formSubmit">Отправить</button>
</div>
</form>
Answer the question
In order to leave comments, you need to log in
Easiest option:
ajax + php + PHPMailer (or at least the built-in php mail function )
Scheme of actions:
1. Raise a simple back (what is more convenient for you php, nodejs, python, ruby, etc.);
2. Choose either a mailing service and use it, or find a library that can work with a mailbox and drop messages from it, and connect to it;
3. Create a simple API, if you only need to send mail, then with 1 endpoint;
4. Accept the request on the server, take the data, and send it to the mail, the documentation for your library or service that you have chosen will tell you exactly how to send it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question