Reputation: 55
Ok, I'm trying to program a php page that will allow the user to pick a season and an episode from a form. Then It sends it to a page that plays them all.
Here is the form:
<form action="view" method="get">
<select>
<option name="s" id="s" value="1">1</option>
</select>
<select>
<option name="e" id="e" value="1">1</option>
</select>
<input type="submit" value="GO">
</form>
I'll add the other seasons and episodes in later. When they submit the form to the page VIEW, it sends it to the url and adds the question mark, but doesn't define the variables like so
http://127.0.0.1/media/show/view/?
I've never had this issue before, how do I get it to define the variables using GET in the url? I'm sure I'm missing something simple... Also, I've manually defined the variables in the url and my videos play just fine.
Upvotes: 0
Views: 21
Reputation: 13128
As I stated in the comments, you can't have a name
attribute on an option.
You should construct your select
elements like this:
<select name="s">
<option id="s" value="1">1</option>
</select>
<select name="e">
<option id="e" value="1">1</option>
</select>
That will append them to your url correctly.
Upvotes: 4