php - Read which button was clicked to variable -
php - Read which button was clicked to variable -
how read variable button clicked.
i have 5 button's answers.
<fieldset> <legend> question1 </legend> <input type="button" value="1st ansswer"/> <input type="button" value="2nd ansswer"/> <input type="button" value="3rd ansswer"/> <input type="button" value="4th ansswer"/> <input type="button" value="5th ansswer"/> </fieldset>
i want read reply question 1 variable send via email.
for improve explain want
<select name="soption"><option>option1</option><option>option2</option></select>
i read result in variable question
$question= $_post['soption'];
how same button's instead select.
hope understand
<fieldset> <legend> question1 </legend> <input type="button" name="foo" value="1st ansswer"/> </fieldset> $question= $_post['foo'];
just add together name or id each button value want.
php html
Comments
Post a Comment