wayne Posted September 20, 2008 Share Posted September 20, 2008 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 More sharing options...
BlueSkyIS Posted September 20, 2008 Share Posted September 20, 2008 you name all of your html entities horse, name='horse'. use a different name/id for each entity. you also have no name for your select. you might want to google a basic php form tutorial. Link to comment https://forums.phpfreaks.com/topic/125128-submit-form-help-for-list-of-options/#findComment-646714 Share on other sites More sharing options...
wayne Posted September 20, 2008 Author Share Posted September 20, 2008 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> Link to comment https://forums.phpfreaks.com/topic/125128-submit-form-help-for-list-of-options/#findComment-646737 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.