copy paste stuff

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

copy paste stuff

Post 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:
User avatar
Stoker
Forum Regular
Posts: 782
Joined: Thu Jan 23, 2003 9:45 pm
Location: SWNY
Contact:

Post by Stoker »

something like this maybe?

$string = preg_replace('/(\n|\r)/','',$_REQUEST['formfield']);
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

Post by AVATAr »

checking... quick answer... thks
Post Reply