M
M
Mikle8882018-02-12 09:31:04
PHP
Mikle888, 2018-02-12 09:31:04

Checking which of the checkboxes are selected and sending in an email?

The site has the following form:
5a81348252adb813697588.png5a813485a0f5e697114584.png
I don't understand php myself, how can I check which of the checkboxes are selected and send it in an email?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Shabalin, 2018-02-12
@nikolayshabalin

Give checkboxes the same name if they are of the same data type.
Set the checkboxes to `value` so that the server understands which checkbox with which value is selected.
When submitting the form to the server, it will go away, something like this

{
  "phone" : "+7xxxxxxxxxx"
  "check": 'value2'
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question