3 messages in com.mysql.lists.perlRe: form parameter passing| From | Sent On | Attachments |
|---|---|---|
| mark o' sullivan | 22 Oct 2003 05:58 | |
| Leif W | 22 Oct 2003 07:11 | |
| Dave Cash | 22 Oct 2003 08:47 |
| Subject: | Re: form parameter passing![]() |
|---|---|
| From: | Leif W (warp...@usa.net) |
| Date: | 10/22/2003 07:11:37 AM |
| List: | com.mysql.lists.perl |
For some reason the list doesn't set the Reply-To header, I didn't notice, so my reply went only to the original poster. Mark sorry if you get this twice. Here it is for the archives.
----- Original Message ----- From: "Leif W" <warp...@usa.net> To: "mark o' sullivan" <mark...@aib.ie> Sent: Wednesday, October 22, 2003 9:31 AM Subject: Re: form parameter passing
----- Original Message ----- From: "mark o' sullivan" <mark...@aib.ie> To: <pe...@lists.mysql.com> Sent: Wednesday, October 22, 2003 8:58 AM Subject: form parameter passing
Hi, Anyone know is it possible to get a string from a drop-down menu in a form and pass it from one perl script to another. The way it currently is:
Script 1: print "<select name=task>"; while(my ($task)= $sth->fetchrow_array) { print "<option value=$task>$task</option>";
Have you tried quoting the value? It's probably because it needs to be quoted, otherwise it looks just like other HTML parameters to the option tag. Valid HTML required ALL values to be quotes, be they table parameters or form values. Most browsers just work without quotes by convenience.
print "<option value=\"$task\">$task</option>";
<option value=real_value invalid HTML ignored>
versus
<option value="real_value and extra stuff">
Leif
} print "</select>";
Script 2: $task = param("task");
I only get the first part of the $task string read in from the drop-down menu. Example '$task' strings: (1)Caching the browser. (2)DSL to RSA conversion.
What I'm getting: (1)Caching (2)DSL
Any alternatives for param to read strings? Thanks in advance, Mark.
********************************************************************** This document is strictly confidential and is intended for use by the addressee unless otherwise indicated. Allied Irish Banks **********************************************************************
-- MySQL Perl Mailing List For list archives: http://lists.mysql.com/perl To unsubscribe: http://lists.mysql.com/perl?unsub=warp...@usa.net




