<form method="post" action="" id="myForm">
<ul>
<li>Male</li>
<li>Female</li>
</ul>
<input type="submit" name="submit" />
</form>
After the form is submitted .How can i know which li tag is clicked and i want to post that to php
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
give ids and classes to the li tags to register the click event, on that click event update a hidden field with the id, index, or text of the li so that it will be available on post. If you are unable to give unique id’s or text values you can just use the index() of the li.