Jump to content

Submit Form Help for list of options


wayne

Recommended Posts

Hi

 

Im learning very slowly (started 3 days ago) and wasted an hour trying to do something which I cant figure out so Ill bow my head and ask the knowledgeble.

 

I have the below code but on insert it inserts into the column "horse" the value of "submit" which is the value for my submit button. What i want it to do is submit the value that the user picks from the list of options. I know its probably simple but what do i need to do please ?

 

<form action="horseinsert.php" method="post" name="horse" id="horse">
<select $horse="options[]">
<option value="Please Select" selected>Please Select</option>
<option value="Horse A">Horse A</option>
<option value="Horse B">Horse B</option>
<option value="Horse C">Horse C</option>
<option value="Horse D">Horse D</option>
</select>
<input type="submit" name="horse" value="Submit">
</form>

 

 

Link to comment
https://forums.phpfreaks.com/topic/125128-submit-form-help-for-list-of-options/
Share on other sites

Thanks, used and works, im can sleep happily.

 

<form action="horseinsert.php" method="post">
<select name="horse">
<option ="Please Select" selected>Please Select</option>
<option ="Horse A">Horse A</option>
<option ="Horse B">Horse B</option>
<option ="Horse C">Horse C</option>
<option ="Horse D">Horse D</option>
</select>
<input type="submit"/>
</form>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.