Why is my form sending garbage?

R

Rich Grise

[Crossposted: alt.html,perl.beginners.cgi,because it's and HTML form
calling a perl CGI script.]

I'm working on a page with some pix and a box to enter a caption - it's so
I can ask the boss what captions he wants for the website pix.

Anyhoo, I'm having a devil of a time. Here is the (abbreviated) form I'm
using: http://mysite.verizon.net/richgrise/Formthing/2captions.html
(The submit button won't work, I've got action on my local box.)
and here's the source:
http://mysite.verizon.net/richgrise/Formthing/2captions.html.txt

And here's the script:
http://mysite.verizon.net/richgrise/Formthing/funform.pl.txt
And here's its output from that script's interpretation of my form:
http://mysite.verizon.net/richgrise/Formthing/funform-2captions-out.html

But the site where I got this script:
http://bignosebird.com/formls1.shtml
offers a test html:
http://mysite.verizon.net/richgrise/Formthing/funform.html

With the same script, it works like a champ:
Again, the submit button won't work, but here's the output on my box:
http://mysite.verizon.net/richgrise/Formthing/funform-funform-out.html

In other words, their html works, and mine is doing something goofy.
As you can see from the HTML, both are being submitted to the same
script; I know it works because of their example - what's my form
doing to the script's inputs?

Yes, I've been RTFM for almost two weeks now trying to fix this on
my own, and have given up. )-;

Thanks in Advance,
Rich
 
J

Jukka K. Korpela

Scripsit Rich Grise:
[Crossposted: alt.html,perl.beginners.cgi,because it's and HTML form
calling a perl CGI script.]

I wonder what the latter group is. I guess it has a limited
distribution.

Anyway, you should first check what gets sent as form data. If it is
wrong, you may have an HTML problem. If it is OK, then the problem is
not in HTML.
Here is the (abbreviated) form
I'm using:
http://mysite.verizon.net/richgrise/Formthing/2captions.html (The
submit button won't work, I've got action on my local box.)

Huh? Yes, it does not work. Why don't you try making it work?

And why are you using XHTML? And invalid XHTML at that.

I think people can be expected to know how to View Source, if you expect
help from them.
And here's its output from that script's interpretation of my form:

It looks like normal multipart form data, uninterpreted. I don't see
what you are trying to ask.

Looks like their form defaults the enctype attribute while yours has
enctype="multipart/form-data". Apparently their script cannot handle
multipart data. This is a good reason to find a better script. Other
reasons include the following:
- it generates invalid HTML as the response
- when installed, it sets up an open relay, which can be used and will
be used by spammers to send spam thru your server, creating troubles for
you, too.
(It takes a form field and directly uses it as E-mail destination
address. This means that anyone or anything can use it to send E-mail to
anyone, as often as desired.)
 
R

Rich Grise

Scripsit Rich Grise:
[Crossposted: alt.html,perl.beginners.cgi,because it's and HTML form
calling a perl CGI script.]

I wonder what the latter group is. I guess it has a limited distribution.

Anyway, you should first check what gets sent as form data. If it is
wrong, you may have an HTML problem. If it is OK, then the problem is not
in HTML.

Well, I've gone ahead and made it "work" - here's the one that works:
http://www.abiengr.com/Rich/Gallery_in_Work/funform.html

Here's the one that doesn't:
http://www.abiengr.com/Rich/Gallery_in_Work/2captions.html

And they're both using this script:
http://www.abiengr.com/Rich/Gallery_in_Work/funform.pl.text

As you can see, it's pretty straightforward with their funform, but
no matter what I put in for the 2 captions, I get garbage.

Go ahead and try it now, and see if you can find out anything,
OK?

Sorry for not being more straightforward with it.

Thanks,
Rich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,058
Latest member
QQXCharlot

Latest Threads

Top