how to get the value of text box / dropdowns from another page.?
I have a dropdown menu and textbox on a page and when they click submit. I want to use the value they input in the textbox and dropdown on another page.
Now you must have newpage.php In this page you get the contents submited from the previous page with the following way : $opt=$_GET[ 'opt' ]; // the selected dropdown value $text=$_GET[ 'text' ]; // the typed text in text box
Use 'echo $opt;' and 'echo $text;' to show them.
rainborick
1:47 pm on Sep 6, 2010 (gmt 0)
You don't absolutely have to use PHP or other server-side software. JavaScript can also work with a query string in a URL created with a <form> whose method is set to "GET". You can get the contents of a query string in location.search, as in:
params = new Array(); query = location.search; params = query.split('&');
'params' then holds the name/value pairs from the query string.