Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass string to PHP but CRLF stripped out 1

Status
Not open for further replies.

sen5241b

IS-IT--Management
Sep 27, 2007
199
US
User enters text into HTML form and text, with CRLFs, is passed via POST method to PHP script. I var_dump text but all CRLFs are stripped out. Why? How can I preserve CRLFs in the PHP string value?
 
Ok so the CR LFs -ARE- getting passed but var_dump doesn't display them. strpos finds the CR LFs in the string.

When I paste the output from var_dump into a text editor it is a different length than what strlen says and the CR LFs seem to be gone. Strlen has a bigger length than the editor.

WHY?
 
Hi

sen5241b said:
Ok so the CR LFs -ARE- getting passed but var_dump doesn't display them.
And how are you displaying the [tt]var_dump()[/tt]'s output ?
Is it displayed in a HTML page ? I guess, yes.
Is it displayed inside an element with [tt]white-space: pre[/tt] ( or just simply [tt]pre[/tt] tags ) ? I guess, no.

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top