Welcome to WebmasterWorld Guest from 220.127.116.11
I have a unique problem...there are a number of forms on my site...and on clicking the submit button it calls the cgi file located in the cgi bin on the server!(this has been done by someone else for me)
Now my problem is: I have made a new form and i tried to give its action as one of the cgi files already existing...and on submitting, the data is coming to me like i wanted it to in my inbox(with all the right fields)....but since i have linked it to an already existing cgi the subject shows the name of that file.
So i downloaded one of the cgi files..and changed its subject and uploaded it after renaming it. Then i mentioned it as my form action:
Now when i submit it shows internal server error.....what is wrong! am i supposed to change something else in the cgi file.
I don't know cgi well and so cannot make out what more i am supposed to do or how one cgi file works and the other does'nt!
Any views on what i should do.....have a certain deadline and need to solve this problem soon!
I am using Ws_ftp to upload my pages to the server. The chmod of the file is 766 right now. ie,
Owner: Read write Execute - all 3 checked
Group : Read write - both checked
Other : Read Write - both checked
How do i change it to 0755?
Please instruct what changes i need to make to change the chmod....from what it already shows?
What does this do exactly?
The reason is that your webserver runs as a user that is not you, and (probably) not in the group that owns the file, so it's an "other" user. It needs to execute the file, so it needs to be able to read and execute it.
Now that you have it fixed, here's how the permissions work. The first digit is for "user" that owns the file (also called owner, but that's confusing. The second is for the group that owns the file, and the last digit is for everyone else. The way you get the number that goes in each spot is that "read" permissions are worth 4, write is worth 2, and execute is worth 1. You add up the permissions you want to get the number.
There's a lot more in the manual page for "chmod".
In an attempt to move ahead!, if I now want to split my form into two parts..ie, once he fills a certain number of fields, I want him to click on continue, a new page opens saying please fill in the following details to confirm your order,how do I do this?
Do I create a new form in the next page, or do I mention the same form name as my main form and then mention the same cgi file name in the action element.
Will this submit data from both forms in the same cgi? Please advice!
Thanks in advance
If you submit on page 1 as well as on page 2, you will get two submits for the same order, and that is not what you want.
You need a procedure for storing what is input on page 1, plus storing what is input on page 2 as well, and then submit both.
This is achived by making the output of the first CGI script be the HTML page with the form on it for the second CGI script. In practice, they can be the same script if you want.
Another option, which is more complex, but flexible, is to give the user a cookie or something so that you can uniquely identify them (a session identifier) and them remember all of their answers to the first form in a database. When the second form is submitted, take the input from it plus the stuff you pull out of the database (that they submitted a few moments ago) and do whatever processing you need to.
I have just described a huge field in 3 paragraphs. You will naturally not find all of the answers here. It should give you a gist and a direction for research.