Monday, 15 June 2015

HTML -- PHP to Email -



HTML -- PHP to Email -

not sure if i'm doing right. new stuff... have multistep form i'm trying submitted email. form has set of buttons in each phase. i'd selected buttons sent email.

html:

<fieldset id="secondfield"> <h2 class="fs-title"> select 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 // 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

you should utilize "select" html tag purpose. user can select options , submit form pressing 1 button :

<fieldset id="secondfield"> <h2 class="fs-title"> select course</h2> <select name="course" class="next action-button"> <option value="math">math</option> <option value="science">science</option> </select> <input type="submit" value="choose" /> </fieldset>

then can retrieve course of study value selected user :

$course = $_post['course']); // either "math" or "science" here

php html multi-step

No comments:

Post a Comment