Page 1 of 1

copy paste stuff

Posted: Tue Feb 18, 2003 12:47 pm
by AVATAr
i have a form with a text field (a title of an article supose, it has to be only one line).

A user copy some text from a web page and paste it on my field.

when i dispaly that field.. the texts wraps itself (like the origianl one). I supose that there are \n on it... how do i KILL THOSE BASTARDS :D

ideas? i have to chango my form? the way i display it?

shoot

:wink:

Posted: Tue Feb 18, 2003 12:53 pm
by Stoker
something like this maybe?

$string = preg_replace('/(\n|\r)/','',$_REQUEST['formfield']);

Posted: Tue Feb 18, 2003 12:56 pm
by AVATAr
checking... quick answer... thks