Get value from Select menu


Posted on 16th Feb 2014 07:03 pm by admin

Hi!

Have tried to find the solution on the web. Don't know if there is an easy one. A description:

Line number On/Off | Expand/Contract<form method="post" name="me" action="http://chart.apis.google.com/chart?cht=lc&chd=t:30,35,36&chxt=x,y,r&chl=:<? echo $month_arr[0]; ?>|<? echo $month_arr[1]; ?>|<? echo $month_arr[2]; ?>"> <select name="month_sel" id="month" style="width: 50px;"> <option value="3">3 months</option> <option value="6">6 months</option> <option value="3" SELECTED>3 months</option> </select><?php $first_month = $month-$s; $month_arr[0] = $first_month;..?><input type="submit" value="submit" name="submit"></form>
The thing is that I want to pass the value from the selected option in the menu into $s. Then pass the array to the Form action tag. Is this possible maybe with a return function?
I know how to get the value with javascript and OnChange but don't know how to use it.

No comments posted yet

Your Answer:

Login to answer
312 Like 26 Dislike
Previous forums Next forums
Other forums

Finding digits in variable containing text, and IDing them
$romanstock = "http://www.remoteprice.com/data.asp?storeid=123&itemcode=456&typ

Count Session and Trigger Events
I am New in PHP, seeking a method to count logged users by counting the sessions or any …, is

Header redirect
Hello ive got a problem ive got form with its action set to itself.
Code: <form id="f

Images in email problem
I found this script for sending emails, it works but if the email has <img src="image.jp

Javascript or not?
How many people prefer javascript/ajax sites? How many prefer the good old fashion straight php sit

phpMailer will not connect using SMTP
I am trying to use phpMailer with smtp:

Code: [Select]$mailer = new PHPMailer();
$mailer-&

CE 7.1 and External GIS integration
Hi All,

We want to develop an application on CE 7.1 which uses GIS features from an exter

code help - pagination
Hi all, I have this code, basically a user logs into my site and they get this page.

The pro

Is it a good practice to store user info. in sessions?
I am making a user class for my script which stores all the user information in sessions. It takes u

mysql_affected_rows() usage
Possibly a MySQL issue, but the function that is not behaving in the anticipated way is a PHP functi

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash