PDA

View Full Version : max content for a textarea using post


pardicity3
04-24-2003, 05:09 PM
Just how much can a textarea send using the post method? I have a page with a form on it that I use to update my log. When I try sending the information, using post, to a php script that puts it in a databse it often doesn't get put into the database. This only happens when I have a large message in the textarea. If I just type like 100 characters or something, it puts it in the databse, but if it is really large (I am not sure, but upwards of 1500 characters) it does not get put in. The even wierder thing is that php script finishes fine and gives me no errors as if it worked perfectly fine.

So, in conclusion, is there a max amount of characters that can be sent by a text area? I see that this form that I am typing in now to input my post allows 10000 characters. The messages I am sending are diffenetly not this long...oh so confusing.

P.S. I wasn't sure where to post this, I could have put this in php I suppose, or maybe mysql, or maybe pc issues since it could be me browser. I just figured that since it dealt with a textarea it would be fitting here. Mods, move if desired!

BoR|S
04-24-2003, 05:23 PM
I think it's because the database field type is not enough for the amount of text you send...

pardicity3
04-24-2003, 05:36 PM
See this is why I thought I should have put this in a different forum, It's gonna turn into a thread that has nothing to do with HTML :rolleyes: .

Anyway, I have the column set to mediumtext which should be more than enough for the amount of text I am sending. Plus, I can manually edit the column and put the text I was trying to send to it in there myself and it holds it just fine....

Roy Sinclair
04-24-2003, 09:44 PM
I think you're right, this isn't a problem with your HTML. You might try echoing the textarea contents back to your results page just to ensure the whole thing gets to the PHP code and is processed properly. If it doesn't get there, you can look at how the PHP code is handling it and if it does get there then echo your SQL statement and make sure it gets build properly, finally check into your database to see why it might be rejecting your SQL.

pardicity3
04-24-2003, 10:08 PM
Yep, okay, so this post definetley does not belong here...but it is okay as I have figured out me problem.

Anyway, I put this little line of code into my script (I already had the query variable in there, the die part is what I put in):

$query="INSERT INTO log VALUES ('','$title','$date','$message')";
@mysql_query($query) or die("Couldn't query");

And it sure did return "Couldn't query". So I figured that there was possibley something wrong with my $query variable. Oh and there was...see I had stipped the slashes on all those other variables that I was putting into the database and it seems that isn't a good idea. So I just changed my code so that it did not strip the slashes and viola! Stupid Stupid me and being an amature at mysql.....