不知道我这样做是否正确。对这些东西完全陌生...我有一个多步骤表单,我正试图将其提交到我的电子邮件中。表单在每个阶段都有一组按钮。我希望将选定的按钮发送到我的电子邮件。
HTML:
<fieldset id="secondField">
<h2 class="fs-title"> Select A Course</h2>
<input type="button" name="course" class="next action-button" value="Math" />
<input type="button" name="course" class="next action-button" value="Science" />
</fieldset>
PHP
<?php
// from the form
$course = trim(strip_tags($_POST['course']));
$count = trim(strip_tags($_POST['count']));
// set here
$subject = "Course Request";
$to = 'email';
$body = <<<HTML
COURSE: $course
PARTICIPANTS: $count