mccorvic Posted August 14, 2009 Report Share Posted August 14, 2009 (edited) I've come across two problems with trying to make a form with textarea. 1. For whatever reason if the form is POST I'll get a MySQL query errory because of text area, but it seems to work fine with a GET form. Any ideas why or does it not really matter in this case and I should just use GET? 2. With text area any time anyone inserts a ' or any kind of html tag (this is a very low tech form) it messes up the php string and gets an error. I was hoping to make this form friendly to those without PHP skills seeing as I'm still a n00blet myself. Suggestions? 3. Or maybe I shouldn't be using textarea at all? Is there another simple tag i should be using? I didn't want to use input field since that seems to give me very limited space to type. Thanks Edited August 14, 2009 by mccorvic Quote Link to comment Share on other sites More sharing options...
falkencreative Posted August 14, 2009 Report Share Posted August 14, 2009 1. A text area should work fine -- I have used them with no problems before. What query error are you getting, and what is the HTML/PHP code you are using? 2. You want to use this function when you get the information from the textarea: http://us2.php.net/manual/en/function.htmlspecialchars.php Quote Link to comment Share on other sites More sharing options...
bishwadeep Posted August 18, 2009 Report Share Posted August 18, 2009 Hi mccorvic, Since you have not post your code, i am gussing that the error is related to escape string. you can just access the value like: $textareaValue=mysql_escape_string($_POST['textarea name']); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.