So I have this form with a dropdown list and two buttons. I want to be able to select something from the dropdown list and send that information to two different pages depending on which button I press.
<form action="(edit_user.php or create_user.php)" method="POST">
<select id="dropdown" name="users" size="30">
<option value="user1">Joe</option>
<option value="user2">Jane</option>
<option value="user3">Snuffy</option>
<option value="user4">Mahabirsinghmatos</option>
</select>
<input type="submit" value="Create User" />
<input type="submit" value="Edit User" />
</form>
I want to send the form information to one of those two php files according to which button I pressed.
How would I go about doing that?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…