Okay, so I was thinking: Why would I be able send an image of several MB in size via forms, but I can't send this few KB of text? When I send images, I have to include
enctype='multipart/form-data' in the form tag, so I thought maybe that has something to do with it. I popped that in my code, and it worked! Woohoo! So now the HTML form tag looks like:
<form action='server-scripts/spellchecker.pl' method='post' enctype='m
+ultipart/form-data'>
Hopefully this helps others in the future.
Update: I've had a couple questions about the code I posted being what I'm actually using on my server. I want to assure everyone that I copy-pasted from emacs when creating this thread. The HTML page is called blank.html (it was just a test page), and the CGI script is called spellchecker.pl. The original spellchecker.pl had a ton of stuff in it, but I stripped it down to the bare minimum when I was debugging.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.