   How to Detect Enter?
  Hi,i''m coding a small Forum, amongst other things in PHP.When I write here, I press Enter to start a new line, a new paragraph, but in my code, the "enter effect" is lost.What I mean is that all lines are countinuous, there are no new paragraphs?Im using PHP, mySQL and &#106avascript...How do I correct this?   [Hugo Ferreira][Positronic Dreams]All your code are belong to us!
  When someone presses the enter key, you need to write a line feed/carriage return pair. In ASCII, that''s 0x0D0A.   ;  so in &#106avascript i detect when the enter is pressed, and i had those chars to the textbox?is that all?   [Hugo Ferreira][Positronic Dreams]All your code are belong to us!;  Should be. I''ve never used PHP or &#106avascript, and I''ve never really done anything major with a textbox, so I can''t say from experience, but too my knoweldge, that should do it.   ;$text = ereg_replace("\r\n","<BR>",$text);  that will preserve the 'enter effect' (in php)oh, i should add.. this should be called after the form is submitted, before you insert it into the db[edited by - DEbig3 on September 27, 2003 9:24:07 PM] [edited by - DEbig3 on September 27, 2003 9:25:30 PM];  That worked!Thanx Nemesis2k2 and DEbig3!  [Hugo Ferreira][Positronic Dreams]All your code are belong to us!