?
Solved

CGI. Define a new param

Posted on 2011-05-10
3
Medium Priority
?
362 Views
Last Modified: 2013-12-25
Is there anyway to manually add to the form data that has been submitted?

What I do is check the cookie and the form data submitted. if a data element is missing I want to add it before feeding the existing form data to subroutines.

i.e. the field TEST is missing. I want to assign a default value of 123

since you can't "$ar->param('TEST')=123;"... it is undefined and you can define an un editable varialble is there any way to modify the form data either before or after $ar = Apache2::Request->new($r); ?



use Apache2::Request ( );
use Apache2::Cookie;
use URI::Escape;
my $r = shift;
my $cookies = Apache2::Cookie->fetch($r);
my $ar = Apache2::Request->new($r);
$r->content_type('text/html');
0
Comment
Question by:Bob-Villa
2 Comments
 
LVL 27

Accepted Solution

by:
wilcoxon earned 2000 total points
ID: 35729917
I don't know about Apache2::Request but the syntax looks similar to CGI and, in CGI, you can do:

$ar->param('TEST', 123);

I would try that and see if it works in AR.
0
 
LVL 9

Expert Comment

by:Suhas .
ID: 37319336
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Six Sigma Control Plans
Suggested Courses
Course of the Month14 days, 17 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question