How to pass value from <option><select> to form action
问题 I need to pass a value in option select to action where I have agent_id= Can anyone help? <form method="POST" action="index.php?action=contact_agent&agent_id="> <select> <option value="1">Agent Homer</option> <option value="2">Agent Lenny</option> <option value="3">Agent Carl</option> </select> 回答1: You don't have to use jQuery or Javascript. Use the name tag of the select and let the form do it's job. <select name="agent_id" id="agent_id"> 回答2: Like @Shoaib answered, you dont need any jQuery