How to remove a blank line in a form
Posted: Fri Oct 20, 2006 11:17 pm
Hello all,
I hope i am posting in the right place. I have built a search engine and it has a basic form in place where users type in some text and it is sent and stored on the database for later retrieval via search.
Now my problem lies in the submission of the text. Usually the users copy / paste their text into the form and that sometimes leaves a bunch of blank spaces in between the lines of text. Example :
this is some text...
this is some more text...
As you can clearly see, there is a blank line in between the two lines of text. This also happens if the user hits enter before they copy /paste, and it leaves an empty line above the text.
Is there a way i can remove this before it is sent off to the database? because when this stuff is searched, the blank lines are stored as well. There are not supposed to be any empty lines like this.
I am running Windows XP. MySQL and PHP 5
Thanks
-- tarja
I hope i am posting in the right place. I have built a search engine and it has a basic form in place where users type in some text and it is sent and stored on the database for later retrieval via search.
Now my problem lies in the submission of the text. Usually the users copy / paste their text into the form and that sometimes leaves a bunch of blank spaces in between the lines of text. Example :
this is some text...
this is some more text...
As you can clearly see, there is a blank line in between the two lines of text. This also happens if the user hits enter before they copy /paste, and it leaves an empty line above the text.
Is there a way i can remove this before it is sent off to the database? because when this stuff is searched, the blank lines are stored as well. There are not supposed to be any empty lines like this.
I am running Windows XP. MySQL and PHP 5
Thanks
-- tarja