Hi,<br /><br />I'm making a backend system for my client's site, where she can upload her own articles for her e-zine by typing it in. Once she clicks on the submit button, the article's added to the mySQL db. <br /><br />However, while testing it, I notice that if I have say 3 paragraphs with over a THOUSAND characters, it won't submit at all. But, if I type a few characters, it does work. Is there any way I can submit more than a thousand characters to the db?<br /><br />Here's what I have: in the textarea of my form, I have character width of 100, and number of lines to 50. On the content field in my mysql db, I have it set to text.<br /><br />Please help! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/unsure.gif" style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" /><!--content-->
A column of type TEXT should hold 65535 characters, so that's probably not the problem. Change it to MEDIUMTEXT (16777215 characters max) if you want to be sure but be aware that you'll have a lot of wasted space (useful reference: <!-- w --><a class="postlink" href="http://www.mysql.com/doc/en/Column_types.html">www.mysql.com/doc/en/Column_types.html</a><!-- w --> ).<br /><br />But I'd say the problem lies somewhere else.<br /><br />It can't have anything to do with the text area's number of lines and columns as those are only there to format the HTML display.<br /><br />Can you post an URL so I can take a look at the page and try to figure out if there's something wrong with the markup?<!--content-->
Hi,<br /><br />I hear your little problem and something like a gut feeling says that I might know what your problem could be.<br /><br />Are you "escaping" your input before trying to do anything with the data, like writing it to the database?<br /><br />If you don't escape your input, and the user types in one of those important string delimiter characters, your program might end up chopping the string at that point, especially in words with conjuctions and all. Those single quote can get you!<br /><br />Escaping your input usually means any unsafe character, including spaces and other unprintable characters, are translated into their corresponding hex values. Just remember to change them back when reading your data from the database.<br /><br />To veryify that this is a probelm, type a whole bunch of letter-only input. If large amounts of text work without single quotes, double quotes, or other probable characters then you found the problem.<br /><br />Good luck!<!--content-->
Good point, Bill! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid="" border="0" alt="smile.gif" /><!--content-->
Yeah, I'am trying to write it to the database. I think I'll try to use mediumtext and get back to you guys. Thanks again! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid="" border="0" alt="smile.gif" /><!--content-->
Oooh... here's my URL: <a href="http://www.starryconstellation.com/addcd.php" target="_blank">CLICK HERE</a><!--content-->
Ok, I tried the mediumtext thing, and I STILL doesn't work! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/sad.gif" style="vertical-align:middle" emoid="" border="0" alt="sad.gif" /> Any ideas anyone?<br /><br />Like when I push submit after writing a large amounts of text, it doesn't do anything. Please help!! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/sad.gif" style="vertical-align:middle" emoid="" border="0" alt="sad.gif" /><!--content-->
Deno, I tried submitting some data through the form a few times and it went through just fine. I tried with a very long text and even typed a few "dangerous" characters (? ' and " ) but it went through. Not sure what the problem could be... <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/unsure.gif" style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" /><!--content-->
Actually Raul, I figured it out! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid="" border="0" alt="smile.gif" /> It's that I didn't put "POST" for my method on the beginning of the form. Thanks anywho! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid="" border="0" alt="smile.gif" /><!--content-->
i see you fixed it. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/biggrin.gif" style="vertical-align:middle" emoid="" border="0" alt="biggrin.gif" /> I had this problem at a former job. It turned out that i couldn't submit (and actually capture) text using get when the entire url including the text area text was over 2000 characters which actually was more like 1960 or so since the other part of the url was about 40 characters long give or take. But i did like you did and switched the form method to post from get and it was solved. <br /><br />Glad you got it fixed though.<!--content-->
A column of type TEXT should hold 65535 characters, so that's probably not the problem. Change it to MEDIUMTEXT (16777215 characters max) if you want to be sure but be aware that you'll have a lot of wasted space (useful reference: <!-- w --><a class="postlink" href="http://www.mysql.com/doc/en/Column_types.html">www.mysql.com/doc/en/Column_types.html</a><!-- w --> ).<br /><br />But I'd say the problem lies somewhere else.<br /><br />It can't have anything to do with the text area's number of lines and columns as those are only there to format the HTML display.<br /><br />Can you post an URL so I can take a look at the page and try to figure out if there's something wrong with the markup?<!--content-->
Hi,<br /><br />I hear your little problem and something like a gut feeling says that I might know what your problem could be.<br /><br />Are you "escaping" your input before trying to do anything with the data, like writing it to the database?<br /><br />If you don't escape your input, and the user types in one of those important string delimiter characters, your program might end up chopping the string at that point, especially in words with conjuctions and all. Those single quote can get you!<br /><br />Escaping your input usually means any unsafe character, including spaces and other unprintable characters, are translated into their corresponding hex values. Just remember to change them back when reading your data from the database.<br /><br />To veryify that this is a probelm, type a whole bunch of letter-only input. If large amounts of text work without single quotes, double quotes, or other probable characters then you found the problem.<br /><br />Good luck!<!--content-->
Good point, Bill! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid="" border="0" alt="smile.gif" /><!--content-->
Yeah, I'am trying to write it to the database. I think I'll try to use mediumtext and get back to you guys. Thanks again! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid="" border="0" alt="smile.gif" /><!--content-->
Oooh... here's my URL: <a href="http://www.starryconstellation.com/addcd.php" target="_blank">CLICK HERE</a><!--content-->
Ok, I tried the mediumtext thing, and I STILL doesn't work! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/sad.gif" style="vertical-align:middle" emoid="" border="0" alt="sad.gif" /> Any ideas anyone?<br /><br />Like when I push submit after writing a large amounts of text, it doesn't do anything. Please help!! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/sad.gif" style="vertical-align:middle" emoid="" border="0" alt="sad.gif" /><!--content-->
Deno, I tried submitting some data through the form a few times and it went through just fine. I tried with a very long text and even typed a few "dangerous" characters (? ' and " ) but it went through. Not sure what the problem could be... <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/unsure.gif" style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" /><!--content-->
Actually Raul, I figured it out! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid="" border="0" alt="smile.gif" /> It's that I didn't put "POST" for my method on the beginning of the form. Thanks anywho! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid="" border="0" alt="smile.gif" /><!--content-->
i see you fixed it. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/biggrin.gif" style="vertical-align:middle" emoid="" border="0" alt="biggrin.gif" /> I had this problem at a former job. It turned out that i couldn't submit (and actually capture) text using get when the entire url including the text area text was over 2000 characters which actually was more like 1960 or so since the other part of the url was about 40 characters long give or take. But i did like you did and switched the form method to post from get and it was solved. <br /><br />Glad you got it fixed though.<!--content-->