Good evening.

There are two inputa and you need to email came the one that was selected

html:

<input id="black" type="radio" name="color" data-name="Черный: "><label for="black" class="black"></label> <input id="brown" type="radio" name="color" data-name="Коричневый: "><label for="brown" class="brown"></label> <div class="send_1"><input type="submit" value="Заказать сейчас" class="send"></div> 

php:

 $send = mail($toEmail,$them,$m_data,"Content-type:text/plain; charset = utf-8\r\nFrom:$fromEmail"); 

There is still ajax connected.

  • So one and fly. Same type = "radio". Only set the value. - Kirill Korushkin

1 answer 1

 <form action="send.php" method="POST"> <input id="black" type="radio" name="color" value="Черный" data-name="Черный: "><label for="black" class="black"></label> <input id="brown" type="radio" name="color" value="Коричневый" data-name="Коричневый: "><label for="brown" class="brown"></label> <div class="send_1"> <input type="submit" value="Заказать сейчас" class="send"></div> </form> 

in the send.php file

 $black = $_POST["color"]; $send = mail($toEmail,$them,$m_data, $black, "Content-type:text/plain; charset = utf-8\r\nFrom:$fromEmail");