Link to home
Start Free TrialLog in
Avatar of hgorovitz
hgorovitz

asked on

html quesionaire

I have a page2a.htm web page which is supposed to send all the input on this page to me by E-Mail. However,there must be an instruction missing on Page2a.htm that prevents all the information from being sent to me at
http://www.flinet.com/~hgorovitz/Page2a.htm
The problem is trying to locate the missing line that prevents the whole page from being sent to me.Copuld you look at page???
Avatar of vendrig
vendrig

You post the answers to a CGI script, yet you're expecting an e-mail... Is that the problem, or else can you rephrase your problem?
Avatar of hgorovitz

ASKER

I am not sending the whole page to my e-mail address.
There are as vendrig said, the problem with the action... if it's not a sendmailscript or something like it... if it is, there's probably some problem with the script rather than the html page.
If it is the problem with the action then try:
<FORM method="post" action="mailto:yourname@yourhost">

Hope I answered the thing you asked for...
And it means the contents of the form fields are sent to you, not the entire page (why do you think that?).
There are programs to put to your incoming mail into databases.
I tried answer from Grdy and tried submitting the info recorded on Page2a.htm. However the only information that showed up on my E-Mail was one line of information which is located in file gb.cgi which is a text file in the directory www\cgi-bin. Other htm pages I have looked at send the page which has answers to multiple questions sends the page to
cgi-bin\gb.cgi. What I am trying to achieve is to get a questionaire filled in by the user, which I can read in my office. Page2a.htm is a sheet which has multiple questions that have to be answered before, the sender can be issued an insurance quote.
I could not access the page you referenced (File Not Found) but I did test your cgi using the following structure and it returned properly to my email account:

<FORM METHOD="post" ACTION="http://www.flinet.com/~hgorovitz/cgi-bin/gb.cgi">

<INPUT TYPE="hidden" NAME="submitaddress" VALUE="YOUR_EMAIL_ADDRESS">

<INPUT TYPE="Text" NAME="name" Value="">

<INPUT TYPE="Text" NAME="email" Size=50 >

<INPUT TYPE="Radio" NAME="reply" VALUE="yes">

<TEXTAREA NAME="feedback" ROWS=10 COLS=45></TEXTAREA>

<INPUT TYPE="Submit" NAME="Submit" VALUE="Submit">

</FORM>

Just cut-n-paste and you should be ok.

David


Subject:
             Form posted from Mozilla
        Date:
             Thu, 01 Oct 1998 00:26:38 -0400
       From:
             Harold Gorovitz <hgorovitz@flinet.com>
 Organization:
             H.G. & Associates, Inc.
         To:
             hgorovitz@flinet.com


Subject:
             Form posted from Mozilla
        Date:
             Thu, 01 Oct 1998 00:26:38 -0400
       From:
             Harold Gorovitz <hgorovitz@flinet.com>
 Organization:
             H.G. & Associates, Inc.
         To:
             hgorovitz@flinet.com




Subject:Form Posted from Mozilla
Date Thu, 01 Oct,1998
From Harold Gorovitz<hgorovitz@flinet.com>
Organization:H.G. & Associates,Inc.
To: hgorovitz@flinet.com
       
  Symbol Here             Part 1            Type: application/x-www-form-urlencoded

Dear David:
I cut and pasted your data to my page and then submitted Page2a.htm to my email site and got the above printout when I went to my messages and got my messages.
    Part 1

           Type:
                 application/x-www-form-urlencoded
Going back to Grdv's answer what you need is the following:
<FORM method="post" action="mailto:yourname@yourhost" enctype="multipart/form-data">

This should work.

excuse me rafistern, BUT:
  1. He told that it didn't work even if it should have done...
  2. Who the *beep* gives you the right to steal MY answer??
hgorovitz: do you realize that you have two FORM tags? Looking at your code, you only want one.
grdv: take it easy, rafistern extended your answer with reference, just as you extended my comment.
oh, sorry... didn't see that anything was changed.... very sorry...

// Gustav
Harold,

I'm still at a disadvantage here in that I can not access page2a for some reason. From the comments I read here, it seems the other guys are able to read it (?)

The only other thing I can suggest is that some (old) CGI scripts do not allow you to arbitrarily add field names to a form without making the same changes to the CGI itself.

As an example, if you have a text box within the form named "email" you would have to have the same reference in the CGI.

Until I can see the page I don't know what else to suggest.

David
david: try all lowercase (he changed the URL)
Please give me an address where I can attach and email you a copy of Page2a.htm from my floppy disk where I have made corrections recommended by you. This will assure me that we are looking at the same file. The file is printing the clear and submit key far to the right-[In effect off the page when you print the form. It is also printing an extra box for
making additional comments. Also two boxes side to side on printing at very bottom.
It would give me great solace, if I could send you the file.
Addendum to previous submission. Can I also send you copy of my gb.cgi file since you mention something about CGI scripts.
Harold, Go ahead and send me your CGI. I don't need html thanks to vendrig. Check your email account - I submitted a form for testing the CGI action.

vendrig - dUh - Thanks, DLH


Forget the CGI. I found the problem. I will send you the fix here in just a few minutes.
ASKER CERTIFIED SOLUTION
Avatar of dhinckle
dhinckle

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Harold,

Sorry - I'm in a rush. THE PROPOSED answer does NOT work.

The problem is in the CGI.

Email it to me and I'll take a look at it.

David
Dear David:
Could you put a check box commands, radio command and insert text type commands. type lines in the example you sent me.It would allow me to elimate unnecessary typed instructions and proceed far faster. I have so much formatting involved that you are right that it is only causing confusion until I have my questionaire working properly.
Harold-

These examples should work for you but I will need your CGI (see comment above - sorry about that - I was testing my CGI, not yours). Actually, I would suggest you use a more up-to-date script. The one I use is called FormMail and I think it can still be found at http://www.worldwidemart.com/scripts/ . This is a very versatile and EASY script by Matt Wright.

Radio Button Example:<p>
<input type="radio" name="question1_answer" value="Yes"><br>
<input type="radio" name="question1_answer" value="No"><p>

Check Box Examples:<p>
<input type="checkbox" name="Answer_A" value="A"><br>
<input type="checkbox" name="Answer_B" value="B"><br>
<input type="checkbox" name="Answer_C" value="C"><p>

Text Area Example:<p>
<textarea name="Comments" rows=5 cols=50></textarea>
Harold -

I reviewed the two HTML files you sent via email. I found minor errors in both but nothing that would cause your CGI to take a dump. As I said previously - the problem is in the CGI you are currently using. Since you have access to cgi-bin you need to replace the old script with FormMail or something comparable.

DLH


Dear David Hinkle:
I sent you page 2a.htm and Page2b.htm. Can you possibly E-Mail these back to me.You have my only copies. In my rush here, I cant find my backup. I would hate to rewrite them.
Help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.I sent them I believe to both Expert-Exchange and your own web site.
Dear David Hinckle:

Ignore previous message. I found the files that I thought had been sent to you.They were in undelivered mail. I was able to reconstuct these files. I am now back to square one.
I am still not transmitting the questionaire to my email site.I would still like to send my
files to you along with my bg.cgi file if you need it to see why I cant send. I am using your instructions and I redid the sheet following your format.
To: David Hinckl:
I sent you my gb.cgi file at your at your swbell.net address.
Harold -

This post is more for the group than for you.

1) Reviewed existing CGI and found it very weak.
2) Sent Harold a new CGI script pre-configured for his server.
3) Sent Harold a revised html page2a including comments.
4) Sent Harold complete instructions on optional CGI configuration.
David:
I tried your new Page2a.htm.It is only sending me back the answers to the questions shown on the questionaire. It is not sending me back the questions that were asked for each answer shown. The Page that is sent to me has to show both the question and answer.

My service provider had to help me make the FormMail.cgi executable. The WTP Pro program did not make it executable.

I have to thank you from the bottom of my heart for your dedication in helping me solve my problem. We are almost there unless you tell me that we cannot transmit the question also along with the answer.

Do you go out of your way as a normal course of business to help someone like myself who only knows you over the internet.I thought the dictionary had all the words that one could have to say but I have not found enough to thank you with.

Before, it goes to your head, I will  cancel off for now and wait your reply

Harold,

Sorry, I made an assumption - I thought you knew how to set the permissions for the CGI.

To fix your LAST problem with this stuff, insert your question into the respective NAME portion of each Form Element used. Example:

<SELECT name="Do you live East or West of the turnpike?">
<OPTION value="">Choose One
<OPTION value="East">East
<OPTION value="West">West
</SELECT>

Another thing that's screwing you up - You can not use the same NAME for different elements. Example (As it is now, which is wrong):

Home Phone Number <INPUT type="text" size=30 maxlength=60 name="address">
Address<INPUT type="text" size=30 maxlength=60 name="address">

Should be:

Home Phone Number <INPUT type="text" size=30 maxlength=60 name="phone">
Address<INPUT type="text" size=30 maxlength=60 name="address">

David
D.Hinckle:

I had sent you a note that when I transmit my questionaire to the internet site, It only sends the answers without my seeing the questions. We are extremely close to closing up my problem.Do you add instructions on the questionaire form which in this case is Page2a.htm( later I will have other htm pages) or do you have to add instructions on FormMail.cgi. I hope any added instructions have to be added to the htm pages.
Harold,

The last comment I added addresses this problem. The only other thing I can add is that if you do not fill in an answer you will not get the question either. This can be changed by modifying the CGI (see the Read Me file I sent you earlier). Please do not make any changes to the CGI other than those which are outlined in the Read Me file.

The following html has been tested using your server and works just fine:

<html>

<head>

<title>H.G. And Associates: Automotive Survey</title>

</head>

<body
background=''
bgcolor='#ffffff'
text='#000080'
link='#0000FF'
vlink='#808080'
alink='#FF0000'
topmargin=0
leftmargin=0>

<FORM method="POST" action="http://www.flinet.com/~hgorovitz/cgi-bin/FormMail.cgi">

<INPUT type=hidden name="recipient" value="hgorovitz@flinet.com">
<INPUT type=hidden name="env_report" value="REMOTE_HOST, HTTP_USER_AGENT">
<INPUT type=hidden name="subject" value="Page2a_Survey">
<INPUT type=hidden name="redirect" value="http://www.flinet.com/~hgorovitz/custom_thankyou.htm">
<input type=hidden name="print_config" value="realname,email">

<center>

<font face="tahoma,arial,system" size=2><b>Automobile Quote Sheet</b></font>

<p>

<!--Start Personal Data Table-->

<table
bgcolor='#C0C0C0'
cellpadding='4'
cellspacing='0'
border='0'
width='500'>

<tr>

<td><font face="arial,tahoma,system" size=2>
Name:</font></td>
<td colspan=6><font face="arial,tahoma,system" size=2>
<INPUT type="text" size=25 maxlength=30 name="realname"></font></td>

<tr>

<td><font face="arial,tahoma,system" size=2>
Address:</font></td>
<td colspan=6><font face="arial,tahoma,system" size=2>
<INPUT type="text" size=25 maxlength=30 name="address"></font></td>


<tr>

<td><font face="arial,tahoma,system" size=2>
City:</font></td>
<td colspan=2><font face="arial,tahoma,system" size=2>
<INPUT type="text" size=20 maxlength=25 name="city"></font></td>
<td align=right><font face="arial,tahoma,system" size=2>State:</font></td>
<td><font face="arial,tahoma,system" size=2>
<INPUT type="text" size=3 maxlength=2 name="state"></font></td>
<td nowrap><font face="arial,tahoma,system" size=2>Zip Code:</font></td>
<td><font face="arial,tahoma,system" size=2>
<INPUT type="text" size=10 maxlength=10 name="zip code"></font></td>

<tr>

<td><font face="arial,tahoma,system" size=2>
E-mail:</font></td>
<td colspan=6><font face="arial,tahoma,system" size=2>
<INPUT type="text" size=25 maxlength=25 name="email"></font></td>

<tr>

<td colspan=7><font face="arial,tahoma,system" size=2>
Telephone Numbers:</font></td>

<tr>

<td nowrap><font face="arial,tahoma,system" size=2>
Home:</font></td>
<td><font face="arial,tahoma,system" size=2>
<INPUT type="text" size=14 maxlength=14 name="home phone"></font></td>
<td nowrap><font face="arial,tahoma,system" size=2>
Work:</font></td>
<td colspan=4><font face="arial,tahoma,system" size=2>
<INPUT type="text" size=14 maxlength=14 name="work phone"></font></td>

</table><!--End Personal Data Table-->

<p>

<!--Start Questionaire Table-->



<!--End Questionaire Table-->

<input type="submit" name="Submit" value="Send To HG And Associates">

</center>

</body>

</html>

Yell if you have any more problems.

David
Your latest changes to the format of the Page2a.htm file worked .The form now transmits both the question and answer to my web site.

I do have a funny problem which defies being solved. When I save Page2a.htm and only Page2a.htm, I find two files on the floppy where I saved the file. Both files have the same name Page2a.htm. However, one file is a regular file and one is a shortcut. If I delete the file which is actually a shortcut file. I am using Netscape composer to make changes to Page2a.htm but when I save the file-I find the above problem of having two files produced.
Have you ever had this problem. Please answer if you can.