The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> HTML Help, Drop Down List (Input & Output)
dgtotkov
post Apr 5 2018, 08:20 AM
Post #1





Group: Members
Posts: 1
Joined: 5-April 18
Member No.: 26,629



I have this HTML code which displays 3 drop down boxes and a submit button (image attached):

I want to be able to take the 3 inputs and output a known value based on the 3 drop down list selections.

Can anyone suggest what functions I should use to process the input from the 3 drop down lists and display a pre-assigned outcome?

Thank you,

Current code:

<html>
<body>

<form action="/action_page.php">
<select name="Parents">
<option value="1 Parent">1 Parent</option>
<option value="2 Parents">2 Parents</option>
</select>
<select name="Children">
<option value="1 Kids">1 Child</option>
<option value="2 Children">2 Children</option>
<option value="3 Children">3 Children</option>
<option value="4 Children">4 Children</option>
</select>
<select name="Membership">
<option value="1 Month">1 Month</option>
<option value="3 Months">3 Months</option>
<option value="12 Months">12 Months</option>
</select>
<input type="submit">
<script>
</script>
</form>
</body>
</html>



Attached thumbnail(s)
Attached Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 5 2018, 08:49 AM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



HTML has no functions and HTML can't do that such things. You need to use a programming language.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Apr 5 2018, 09:02 AM
Post #3


.
********

Group: WDG Moderators
Posts: 9,628
Joined: 10-August 06
Member No.: 7



CODE
<form action="/action_page.php">

The above hints at a PHP script, how familiar are you with that?

Probably you'd need IF/ELSE forks or similar to process the different alternatives.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 5 2018, 09:07 AM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Oops. blush.gif

I move this to the server side scripting forum then.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 5 2018, 09:09 AM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Had you already moved it, Christian? I got an error when I tried to and here the topic is.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Apr 5 2018, 10:08 AM
Post #6


.
********

Group: WDG Moderators
Posts: 9,628
Joined: 10-August 06
Member No.: 7



Yes I moved it.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 5 2018, 09:22 PM
Post #7


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



I see now are posts were only a few minutes apart. That explains it.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th March 2024 - 01:56 AM