Hi...
I'm sorry if this has been covered before, but I searched for more than an hour to find a solution and was unsuccessful. Admittedly my lack of success may be due to not knowning how to word or phrase my search to get the desired results (due to ignorance of the 'lingo').
I have a question about multiple values in a dropdown menu in a form.
What I have is a form where I am trying to create the ability for users to enter race results data. What I'd like to do is to have the "Finishing Position" drop down menu also enter the finishing points... so the single "Finishing Position" would enter data into "finish_pos" and "points" fields in the database. This is primarily to ensure that no mistakes between finishing position and the points awarded for that position occur.
An example is below:
<form method="POST" action="results.php">
<select size="1" name="finish_pos">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
-ect.-
</select>
As the $_POST stands with the above code, I'd get a single return of 1, or 2, etc. If I placed the points per position in the value, then I'd get a points return only (175, 170, 165, etc.).
So... is it possible for me to do something like the following?
<form method=POST action=results.php>
<select size="1" name="finish_pos">
<option value="1","175">1</option>
<option value="2","170">2</option>
<option value="3","165">3</option>
<option value="4","160">4</option>
<option value="5","155">5</option>
-ect.-
</select>
... and somehow have the PHP code parse the two different results from the single drop down menu into different mysql fields?
Thanks for any help... this may be an incredibly easy thing to do, I just haven't found any examples anywhere that explain it... 🙁