I have a post form with a text area in it. When I save the text from my textarea into mysql db, the text is saved with some white spaces before and after my actual test.
Why is happening this? How can I overcome this?
Thanks in advance
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s probably whitespace in your markup. For example:
You could either remove the whitespace
Or you could trim() the input before storing it to the database