06-24-2009
Problem with while reading HTML inputs in cgi script
Hi All,
I am not able to read my HTML form inputs properly in my script.
I have a textarea in my form where user needs to enter sql query... but when user enter query like below :
select * from order_queue where NUM_OF_PICKUP >=3 and TRANSACTION_TYPE=4 ;
its coming like :
select 171_arc abn_daily abn_data_cmpltn abn_rpt abn_voice_cmpltn bvoip_rpt calnet_rpt cola_rpt common_gen_row_data common_rpt data_cmpltn data_ptl_cmplt data_rpt getcanx gov_login_add gvpn_rpt he_recap_cgi iom_db_tool iom_vol ipmis_acc_info_rpt ipmis_rpt le_arc le_cycle le_data le_new_vol le_new_vol_a le_recap_cgi le_rejects le_rpt le_saved le_svc_rpt le_vol local_daily_rpt local_legacy_daily_rpt local_rpt local_svc_rpt lpl_act_co lpl_ft n_nod_rejects networx_authenticate networx_dailyrpt networx_rpt networx_user_rpt nod_25 nod_acty nod_feat_data nod_ft_rpt nod_raw_data nod_recap_cgi nod_vol nod_vol_rpt pq_networx_dailyrpt pq_networx_rpt prime_act_co prime_ft prime_lpl_raw proccgi rejects sv_report swv_geo_acc_code_rpt tnet_networx_dailyrpt tnet_networx_rpt vol_report from order_queue where NUM_OF_PICKUP >=3 and TRANSACTION_TYPE=4 ;
From the above ouput, I found that the symbol "*" is getting replaced with all dir and subdir where my cgi script located....
How to get exact input which user enters in the textarea in my HTML form?
I tried like this in my cgi script :
echo "${FORM_input_query}"
Thanks in advance,
Saravana
Last edited by askumarece; 06-24-2009 at 12:25 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Using a HTML page , i'm running a Unix ksh script with <a href=..>.
The script contains loop like this :
for i in
do
rsh.....
done
each rsh command is running quite long and then i would display results in HTML format but about 5mn my blank page waiting for result is running in error... (1 Reply)
Discussion started by: Nicol
1 Replies
2. Shell Programming and Scripting
Hi all,
I've been assigned the task of modifying a script which reads in names of tables from a list file, exports a 30 days worth of data from these tables, then deletes the table. The list file will now contain a table name and a number next to it indicating how many days to archive. I need... (1 Reply)
Discussion started by: MadHatter
1 Replies
3. Shell Programming and Scripting
Hello,
I wonder whether if we have a open file dialog as (in gtk+) in html. I know that a submit-type form (such as <input value="Add File" type="submit">) opens such dialog, but it -naturally- tries to submit the file chosen. I only want to find out the file name, not upload it.
Thanks! (0 Replies)
Discussion started by: f33ldead
0 Replies
4. Shell Programming and Scripting
Hello,
I am using sed as follows -
sed 's/CONTACT SYSTEMS! Some payments have been rejected/<B><font color="red" size="5.0pt"CONTACT SYSTEMS! Some payments have been rejected</font></B>/' $REPORT_FILE
But while executing this, I am getting the error as -
sed: command garbled
&... (5 Replies)
Discussion started by: The Observer
5 Replies
5. UNIX for Advanced & Expert Users
Hi All,
I have written a script which sends mail using “sendmail” command and mail contains HTML code.
When I run scripts on terminal it is working properly, but when I try to run this script through a crontab file it sends blank mail with proper subject.
crontab file detail :
00 05... (1 Reply)
Discussion started by: abhishek.mind
1 Replies
6. Shell Programming and Scripting
Dear all.
I need to extract the title (text between <title> and </title>) of a set of HTML documents.
I've found a command that makes the work of extracting the text, but it does not always work.
It works with the next example:
cat a.txt
htmltext<title>This is a HTML... (2 Replies)
Discussion started by: i007
2 Replies
7. Shell Programming and Scripting
Hi
I have a successfullly run perl script (by issuing command "perl sub.pl" under shell mode) and this sub.pl will call sub.exp successfully. The sub.exp expect script is basically to login to a server and run some commands and put the output into a sub.txt file, it takes about 5 seconds to... (0 Replies)
Discussion started by: cxbest
0 Replies
8. Shell Programming and Scripting
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=border
--border
Content-Type: text/html
Content-Disposition: inline
<html><body><h2>This text should be displayed with html formatting</h2></body></html>
--border
Content-Type: text/plain
Content-Disposition: attachment
This text... (2 Replies)
Discussion started by: thulasidharan2k
2 Replies
9. Shell Programming and Scripting
Hi All,
I'm new to this forum. This is my first question. I'm trying to automate the status related information in our environment. So this is how the output would be.
SEGMENT SERVER PORT1 PORT2 PORT3 PORT4 PORT5
ACS acscsa01 up up up up up
All... (2 Replies)
Discussion started by: anand.aswini
2 Replies
10. Shell Programming and Scripting
Hi ,
I am not able figure out how to use expect tool to send input to this prompt of format
Searching for disks...done
selecting c0t3d0
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition... (3 Replies)
Discussion started by: chidori
3 Replies
LEARN ABOUT REDHAT
html::form
HTML::Form(3) User Contributed Perl Documentation HTML::Form(3)
NAME
HTML::Form - Class that represents HTML forms
SYNOPSIS
use HTML::Form;
$form = HTML::Form->parse($html, $base_uri);
$form->value(query => "Perl");
use LWP;
LWP::UserAgent->new->request($form->click);
DESCRIPTION
Objects of the "HTML::Form" class represents a single HTML <form> ... </form> instance. A form consist of a sequence of inputs that usu-
ally have names, and which can take on various values.
The following methods are available:
$form = HTML::Form->new($method, $action_uri, [[$enctype], $input,...])
The constructor takes a $method and a $uri as argument. The $enctype and and initial inputs are optional. You will normally use
HTML::Form->parse() to create new HTML::Form objects.
@forms = HTML::Form->parse($html_document, $base_uri)
The parse() class method will parse an HTML document and build up "HTML::Form" objects for each <form> found. If called in scalar con-
text only returns the first <form>. Returns an empty list if there are no forms to be found.
The $base_uri is (usually) the URI used to access the $html_document. It is needed to resolve relative action URIs. For LWP this
parameter is obtained from the $response->base() method.
$form->push_input($type, \%attr)
Adds a new input to the form.
$form->method( [$new] )
$form->action( [$new] )
$form->enctype( [$new] )
These method can be used to get/set the corresponding attribute of the form.
$form->inputs
This method returns the list of inputs in the form.
$form->find_input($name, $type, $no)
This method is used to locate some specific input within the form. At least one of the arguments must be defined. If no matching
input is found, "undef" is returned.
If $name is specified, then the input must have the indicated name. If $type is specified then the input must have the specified type.
In addition to the types possible for <input> HTML tags, we also have "textarea" and "option". The $no is the sequence number of the
input with the indicated $name and/or $type (where 1 is the first).
$form->value($name, [$value])
The value() method can be used to get/set the value of some input. If no input have the indicated name, then this method will croak.
$form->try_others(&callback)
This method will iterate over all permutations of unvisited enumerated values (<select>, <radio>, <checkbox>) and invoke the callback
for each. The callback is passed the $form as argument.
$form->make_request
Will return a HTTP::Request object that reflects the current setting of the form. You might want to use the click method instead.
$form->click([$name], [$x, $y])
Will click on the first clickable input ("input/submit" or "input/image"), with the indicated $name, if specified. You can optinally
specify a coordinate clicked, which only makes a difference if you clicked on an image. The default coordinate is (1,1).
$form->form
Returns the current setting as a sequence of key/value pairs.
$form->dump
Returns a textual representation of the form. Mainly useful for debugging. If called in void context, then the dump is printed on
STDERR.
INPUTS
An "HTML::Form" contains a sequence of inputs. References to the inputs can be obtained with the $form->inputs or $form->find_input meth-
ods. Once you have such a reference, then one of the following methods can be used on it:
$input->type
Returns the type of this input. Types are stuff like "text", "password", "hidden", "textarea", "image", "submit", "radio", "checkbox",
"option"...
$input->name([$new])
$input->value([$new])
These methods can be used to set/get the current name or value of an input. If the input only can take an enumerated list of values,
then it is an error to try to set it to something else and the method will croak if you try.
$input->possible_values
Returns a list of all values that and input can take. For inputs that does not have discrete values this returns an empty list.
$input->other_possible_values
Returns a list of all values not tried yet.
$input->form_name_value
Returns a (possible empty) list of key/value pairs that should be incorporated in the form value from this input.
$input->click($form, $x, $y)
Some input types (currently "sumbit" buttons and "images") can be clicked to submit the form. The click() method returns the
corrsponding "HTTP::Request" object.
SEE ALSO
LWP, HTML::Parser, webchatpp
COPYRIGHT
Copyright 1998-2000 Gisle Aas.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
libwww-perl-5.65 2001-08-01 HTML::Form(3)