Re: Newbie PAssing $variables in URL
| From: | Steve Keller | Date: | Mon, 28 Apr 2003 17:15:06 +0000 |
| Subject: | Re: Newbie PAssing $variables in URL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145545@lists.php.net to get a copy of this message | ||
At 4/28/2003 02:43 AM, Bobby Rahman wrote:
Hiya all, Every thread talk about pairs such as test.php?var1=bla I want to send the contents of a variable $project which is selected from a drop down box within the script.
<p><a href="new_bug_form.php?projname=$projname">add bug</a></p>A. This cannot be accomplished with PHP, since by the time the user sees both the form and the link, the PHP has been processed. B. If you want it appended in an actual link like that instead of using the form, you need to use Javascript to redirect the page onClick. However, this is not a Javascript list, so I will tell you how to do that by private email if you contact me. C. If you can tolerate using a submit button, then you change your form's action to "GET." It might serve you to read up on and understand the GET and POST methods before attempting anything like this in the future. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: skeller@healthtvchannel.org Web: www.healthtvchannel.org