It doesn't have to be perl - can be a simple shell script. But that's up to you.
The form will send all the 'data' into QUERY_STRING variable - you just have to read it and separate each field (should be delimited with the & character) with each field having variable=input such as EMAIL=this&SYSTEM=that.
If you write a simple script you can see the results.
Once you see the results, build the script out to actually perform the same actions as the original web page (form_test.htm) by using echo statements to build the page and normal scripting to run the things you want to run (like splitting QUERY_STRING, moving the 3rd piece into a file (which I don't see that 3rd piece in your code).
AAAHHH!! I've made a perl program that you can run on a web browser. This program needs to be run everyday, and I don't want to have to run it everyday. The problem is when I try running the program from my terminal, all it does is print stuff to the terminal page (the program involves a lot of... (4 Replies)
I am currently able to use the $QUERY_STRING variable and simply cut out what I need to be assigned as variables within the shell script. However, I've been able to use the "name" value assigned within the FORM(HTML) as a variable when I use perl. Why is it that ksh doesn't read the "name" in as... (1 Reply)
Hey - I am new to cgi scripting... just writing a script to output df -k output to html page... but I cannot get the df lines on separate lines on the page, it all comes out on one line and is not very readable.. any suggestions?
My script is below - please keep in mind I am only new to it so... (1 Reply)
Hello All,
I was trying to come up with a form using perl cgi. I then created a frame to show the output of the form. Refer below
print $display_form->start_form(-title=>"Updateuser", -style => 'font-size: 9pt; color: #202020 ; font-family: Verdana', action=>"${DOCROOT}updateUser.pl",... (4 Replies)
Hi,
I'm learning some simple cgi scripting. I can make a script like this,
so my browser shows "Hello World"
/www/cgi-bin/name.sh
---
#!/bin/sh
MyName=World
echo "<html> Hello $MyName </html>"
---
What I'd like is to have a separate html and script files in the cgi folder so ... (1 Reply)
hi,i hav a form in cgi perl script.this script accepts a value from user from another html form, and depending upon this value,i need to disable /enable radio buttons in cgi-perl script wen second page is displayed on executing cgi perl script.how do i do it using javascript? (0 Replies)
Hi
I would like to convert standard online man pages from my solaris10 system into html form to publish it on my webpage.
How this can be done in Sol10 ?
thx for help. (2 Replies)
I am using an html form and a php upload script to upload files.
HTML form
<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form action="upload_ac.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<td>
<table... (1 Reply)
Hi All,
I am trying to write a shell script which takes parse the web form find the input field and dump the data of that field into one xml file. The form looks like,
<input type="button" id="btnSave" value="Save" onclick="saveXmlData()"/>
<form name="submitForm"... (1 Reply)
Hi everyone,
I want to kill process through the web, so I create html page with single bottom that run kill command in shell script with CGI.
Here is html code:
<td><form METHOD="GET" action="http://IP:port/cgi_bin/script.cgi" > <input type="submit" value= "Submit" > <INPUT name="q"... (7 Replies)
Discussion started by: indeed_1
7 Replies
LEARN ABOUT REDHAT
escape
escape(1) Mail Avenger 0.8.3 escape(1)NAME
escape - escape shell special characters in a string
SYNOPSIS
escape string
DESCRIPTION
escape prepends a "" character to all shell special characters in string, making it safe to compose a shell command with the result.
EXAMPLES
The following is a contrived example showing how one can unintentionally end up executing the contents of a string:
$ var='; echo gotcha!'
$ eval echo hi $var
hi
gotcha!
$
Using escape, one can avoid executing the contents of $var:
$ eval echo hi `escape "$var"`
hi ; echo gotcha!
$
A less contrived example is passing arguments to Mail Avenger bodytest commands containing possibly unsafe environment variables. For
example, you might write a hypothetical reject_bcc script to reject mail not explicitly addressed to the recipient:
#!/bin/sh
formail -x to -x cc -x resent-to -x resent-cc
| fgrep "$1" > /dev/null
&& exit 0
echo "<$1>.. address does not accept blind carbon copies"
exit 100
To invoke this script, passing it the recipient address as an argument, you would need to put the following in your Mail Avenger rcpt
script:
bodytest reject_bcc `escape "$RECIPIENT"`
SEE ALSO avenger(1),
The Mail Avenger home page: <http://www.mailavenger.org/>.
BUGS
escape is designed for the Bourne shell, which is what Mail Avenger scripts use. escape might or might not work with other shells.
AUTHOR
David Mazieres
Mail Avenger 0.8.3 2012-04-05 escape(1)