Passing FORM(HTML) variable to ksh


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Passing FORM(HTML) variable to ksh
# 1  
Old 02-16-2005
Passing FORM(HTML) variable to ksh

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 a variable as perl does? Am I missing something? If the above seems confusing, here is an example of what's happening:

HTML
HTML Code:
<form action="../ksh.cgi" input="text" name="var1"></form>
#!/bin/ksh
Code:
echo "$QUERY_STRING"

name=(input text)

Code:
echo "$var1"

(blank)

Shouldn't the value entered into the textbox on the webpage be passed to the shell script as "$var1"?

ps. The reason why I'm avoiding perl for this task is due to the numerous scripts written in ksh that can use input from a browser.
# 2  
Old 02-25-2005
Not completely sure what you are trying to do. If you are looking to assign the query string to a variable in your ksh script, then do something like:
var1="$QUERY_STRING"

Example in this thread
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Passing output parameter(Oracle) to variable in ksh Script

Hello, I have researched and tried many way to pass OUT parameter to be stored in variable in KSH Script.Still not success, please help. Here is my Store Procedure. create procedure testout3(v_in varchar2,v_out OUT integer) as begin v_out := 1; end; Here is my testvout.ksh #!/bin/ksh... (1 Reply)
Discussion started by: palita2601
1 Replies

2. Programming

Html form to submit data to bash script

hi all, im going to design a web html form so users can input what username and password they want to make the ftp account, once they enter in a username and password they click on the submit button and it submits it to a bash script and then the bash script will run and finish of making the... (3 Replies)
Discussion started by: robertkwild
3 Replies

3. Shell Programming and Scripting

pass argument to html upload form

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)
Discussion started by: anil510
1 Replies

4. Solaris

man pages in html form

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)
Discussion started by: presul
2 Replies

5. Shell Programming and Scripting

Passing value of variable in KSH

Here is a sample script demonstrating the issue x() { echo "foo" a=1 } ## the value of $a is 1 a=0 x echo $a ## the value of $a stays 0 a=0 x|sed "s/foo/bar/" echo $a Result: foo 1 (1 Reply)
Discussion started by: pbmarvin56
1 Replies

6. Shell Programming and Scripting

Pass variable to php from html form

I am sure this is easy but I can't figure it out... Here is the form. <?php $searchString = $_POST; if (!isset($_POST)) ?> <html> <head> <title>Personal INFO</title> </head> <body> <form method="post" action="search.php"> <input type="text" size="20" maxlength="20" name="search">... (1 Reply)
Discussion started by: mrlayance
1 Replies

7. Shell Programming and Scripting

on HTML form, Call Expect in Perl problem

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. UNIX for Dummies Questions & Answers

Passing KSH variable to AWK with two loops

Hi, I need some help to figure out why an outer for loop KSH variable does not decode in AWK but inner for loop does. Below is my code, If I hard code variable 'SUBSEQ' in AWK it works but if I try to pass the SUBSEQ from KSH, it does not and when I pass the variable 'NAM' from KSH it works: I... (1 Reply)
Discussion started by: chowdhut
1 Replies

9. Shell Programming and Scripting

Converting %## back to special characters from an HTML form

I have an HTML form that sends email to a large list of users one at a time by matching an email address in peoplesoft to their username. It works great, except that special characters are converted to %## format. Is there a library of these I can use to sed them back (yes this is a crappy UNIX... (1 Reply)
Discussion started by: 98_1LE
1 Replies

10. Shell Programming and Scripting

HTML form to cgi help

I wrote a script to automate user account verification against peoplesoft. Now I want to make it available to my peers via the web. It is running on Solaris. I have the form written, but am not sure how to make it work. I think the form should call a perl cgi when submitted. The cgi should call... (7 Replies)
Discussion started by: 98_1LE
7 Replies
Login or Register to Ask a Question