dbTalk Databases Forums  

form parameter passing

mailing.database.msql-mysql-modules mailing.database.msql-mysql-modules


Discuss form parameter passing in the mailing.database.msql-mysql-modules forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mark o' sullivan
 
Posts: n/a

Default form parameter passing - 10-22-2003 , 08:03 AM






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>";
}
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=ms...ie.nctu.edu.tw


Reply With Quote
  #2  
Old   
Leif W
 
Posts: n/a

Default Re: form parameter passing - 10-22-2003 , 09:13 AM






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-9.9 (AT) usa (DOT) net>
To: "mark o' sullivan" <mark.r.osullivan (AT) aib (DOT) ie>
Sent: Wednesday, October 22, 2003 9:31 AM
Subject: Re: form parameter passing


Quote:
----- Original Message -----
From: "mark o' sullivan" <mark.r.osullivan (AT) aib (DOT) ie
To: <perl (AT) lists (DOT) 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=wa... usa (DOT) net






--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=ms...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.