textarea to big

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zeroanarchy
Forum Newbie
Posts: 15
Joined: Wed Jul 21, 2004 8:51 pm

textarea to big

Post by zeroanarchy »

Hi all well looks like I have run into another problem.

I allow the user to add comments to a textarea and then allow them to view their comments on the next page letter.php. The problem is that if the user enters to many characters then the submit button does not work.

I am under the impression it is related to the POST limit 1765. Any ideas on a work around?

I thought about using a cookie, but don't a lot of people block cookie's?

Cheers
zeroanarchy
ldomingues
Forum Commoner
Posts: 41
Joined: Fri Aug 06, 2004 1:15 pm
Location: Portugal

Post by ldomingues »

I don't think recent http servers have such a limit.

Check for magic_quotes or output the POSTed data to the iframe to check for data truncation.
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

perhaps this is a good thing

people could flood your board system with ease if they are allowed such a large amount of characters to enter
zeroanarchy
Forum Newbie
Posts: 15
Joined: Wed Jul 21, 2004 8:51 pm

Post by zeroanarchy »

1782 characters not including spaces, if the characters are exceed by 1 then the submit button does not work.

After a bit of reading the only solution is to store the comments box text into a cookie, the problem with this is that if the user has cookies disabled then this message will not transfer onto the next page.

I am under the impression that this is an IE problem, Netscape and Mozilla do not have a character limit.

So if you find the submit button doesn't work count the text you are trying to store in the query.

Cheers
zeroanarchy
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

how are you submitting this stuff? I'm going to guess your form is a get, which has a limit that approaches very fast. Could you post your code for this form?
zeroanarchy
Forum Newbie
Posts: 15
Joined: Wed Jul 21, 2004 8:51 pm

Post by zeroanarchy »

Hi Feyd

The limit is based on Post I have worked out including spaces the limit is 1944 characters on IE, if you use Netscape or Motzilla the restriction is much higher, how high I don't know as I have not tested it.

Get is something like 230 characters.

if you want to test it take a look at
http://www.envirotalk.com.au/Styx/mail.php

Don’t add your details to the bottom just add 191 characters to the text area and hit submit. Watch what happens on IE then add 192 characters and test again.

Cheers

zeroanarchy
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code: Select all

<form action ="letter.php">
is a get.
Post Reply