Guest upirate Posted April 12, 2007 Share Posted April 12, 2007 I am currently using //lets make sure that details allows alpha numeric, space, $, (), -, period, and [] $text = preg_replace("/[^a-zA-Z0-9\-\s\$\.\(\)\]\[]/i", "", $input); however what do i need to do to be able to cut and paste into the text area and maintain the paragraph and new lines ? thanks guys ??? Quote Link to comment Share on other sites More sharing options...
Lumio Posted April 12, 2007 Share Posted April 12, 2007 what do you mean to cut and paste? Do you mean you want to copy a text, and paste it into an textarea? And in that textarea everything hast to be the same like the original text? If yes, you only can do that with JavaScript. Quote Link to comment Share on other sites More sharing options...
Guest upirate Posted April 12, 2007 Share Posted April 12, 2007 do you know of any sites that may have some information on that ? Quote Link to comment Share on other sites More sharing options...
Wildbug Posted April 12, 2007 Share Posted April 12, 2007 You can preload a textarea with text using PHP, but only when you first send the page to the user. Once the user has the page, obviously you'll only be able to manipulate form data with JavaScript, or some other client-side language. If you wish to retain line breaks, include "\n" in your character class. Then put the text between the <textarea> (insert text here) </textarea> tags. Quote Link to comment Share on other sites More sharing options...
neel_basu Posted April 15, 2007 Share Posted April 15, 2007 I think you are asking fornl2br(). 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.