Hello all,
I'v posted this question on a (Perl)Beginners List because the answer is probably going to be perfectly clear, once I understand it; however, I've received no replies. Perhaps this goes beyond the "beginners" on the other list.
I've read a lot of doc's, etc. regarding passing parameters between html documents via the parameter-pairs listed in the query string of the url. Additionally, Guelich, Gundavaram and Birznieks' book, "CGI Programming" (2nd. ed., O'Reilly & Assoc., 2000), p. 94, explain how to "add" a new parameter to the query string via the url, e.g., the results of executing the following instruction:
$q->parm( title => "Web Developer" );
will appear as "&title=Web+Developer" in the query string. This works, but the authors suggest that a parameter can be "modified" and/or "deleted", too. I have assumed that this means that the parameter value in the url's query string can be (should be) modified as in changed? I cannot change a value, or delete a parameter from the query string in the url. If for example, I have a parameter, "table", (i.e., a MySQL table that in this case, is to be dynamically selected later)that originates in pgm-A but is not assigned a value, then when the parameter is presented to pgm-B, the query string has a value of "&db_name=cookbook&table=&etc=etc". Notice that "&table=" is not associated with a value. If I execute an instruction such as:
$q->param( table => "vendors" );
. . .the result (in additional to other parameters)is: "&db_name=cookbook&table=&etc=etc&table=vendors". Notice that the operation did not change the value of the existing "table" parameter, but "pushed" or ADDED another "table=vendors" pair onto the query string. Also, as the authors suggested, I have tried to execute:
$q->delete( "table" );
. . .but this will not delete or otherwise remove the "table" parameter from the query string. Also, I've been scanning through the source for CGI.pm, and apparently there is not a packaged subroutine for something like $q->modify( "table" );.
Suggestions?
Ron Wingfield
FreeBSD 4.8 -- Apache http 2.0.28 -- MySQL client/server 4.1.7 Perl 5.8.5 -- p5-DBD-mysql-2.9004 driver -- p5-DBI-1.46
In reply to Modifying Parameter Values w/CGI.pm by rtwingfield
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |