i have a few multi-line form fields that i sent to php via. javascript (ajax) however it seems the line breaks are missing when it is put to the javascript, is there any work around to this? e.g. my name is paul ==> my name is paul
Simple!! The problem is you're passing the carriage returns and they aren't being interpretted as line breaks. You need to modify the input to pass these carriage returns as <br />'s. Your solution is: nl2br() Hope that helps
yeah i use nl2br however by the time they get to the php script the carriage returns have already been discarded
Show us some code Are you sure they are being discarded or are you just looking for the wrong carriage return?