Trying to submit web form content to a shell script
Hi I was hoping some one could help me with a problem I have.
I am trying to collect some information from a web form and save it to a text file.
I found an example on this site that is sort of what I am trying to accomplish, the shell script bellow should echo the input back to the browser but I dont seem to be able to make the example scripts and form work on my system. I am working on a mac running El Capitan 10.11.6.
The example uses the korn shell but I have change it to bash on my system.
the code for the form is
the code for the shell script is
I get a couple of different errors when I submit the form through my browser
one is
or
I have tried placing the test.cgi script in the same directory as my html page and and I get the permissions error. When I move the test.cgi script to my /Library/WebServer/CGI-Executables folder and point the form action towards that folder I get a 404 error.
Do I need to change anything in Apache to be able to run cgi scripts?
All I want to do is collect the form data to a text file and without having to use php or python.
If I was able to accomplish this with perl or awk or any shell program that would be great.
I would be very grateful for any help you could give me with this problem.
Hi All,
I'm new in forum.
Many congratulations to everyone for all work.
I'm not an expert in bash script
I've a problem with a sh file.
The sh file run every t minuts and it read data from txt file and then compile form.
Finally, the user, from the web browser click on send.
The script... (0 Replies)
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)
Hello,
I am newbie on php-mysql and just know only installation.
I have an apache2+php5+mysql installed VPS.
What I would like to do is that when visitor enters requested data shown in index.html, submit button will run a script to save each field into a file.
Here is an example shown in... (1 Reply)
Hello,
i have page domain.com/form.php
the form fields on form.php are named:
name=ipaddress
name=port
and submit button is named: submit
i want to ask how the linux command will look like to submit the form filled with:
ipaddress: 127.0.0.1
port: 80
I tried various curl and... (5 Replies)
hello
my script is submitting POST-data to a site
(its not my first script, i've done these before many times (include parsing scripts) but this one is tough)
so the problem is i'm submitting a form with firefox
and in firebug i see WHAT exactly i'm submitting
then
when i do EXACTLY the... (28 Replies)
I am trying to write a shell script to use curl in order to automate downloading data from a website. The URL with the post form is here: http://try-db.org/de/InfoBySpecies.php .
I have a list of about 1800 different species I want to check. For Example, choose the first species and use the... (2 Replies)
I am trying to fill out a web form from within a script I am writing. I think that I should be using curl to do this, but I'm not really sure. The form has username and password fields and a submit button. I want to be able to log in from the command line.
Html from the site:
<h5... (2 Replies)
I'm trying to use wget to submit a form. I have tried to dig out what is actually being "posted" and where, using tamperdata (see below).
http://ubuntuforums.org/attachment.php?attachmentid=109123&d=1239224127
Here is my wget command:
wget --http-user=xyz --http-password=xyz... (1 Reply)
Hi,
I have a custom HTML form that has a couple radio buttons and a text field that requires a number.
I'm not a php programmer and could use some help with putting together php code to calculate a total based on the radio button selection and the text field number.
... (3 Replies)