Cyberoonie
08-01-2007, 07:26 AM
Hi,
I've only just started getting into PHP but have been involved with a web project to get my experience levels up.
What I have at the moment is a contact form that submits all its information to a php processing page. On the processing page it will *eventually* email the details to a specified E-Mail address but also display the information the user entered on the page as a confirmation.
What I'm having trouble with is displaying the multiline text box fields as multiline on the confirmation page. For example, on the contact form there is a "Any Other Information" field that is multiline. If a user enters information with line breaks or paragraphs these are not represented on the confirmation page.
I have imported all of the information into variables so have $other = $_GET['other'] etc. What I have noticed in the address bar is where the line breaks should be they are represended with the ASCII %0D%0A. Just trial and error I tried using str_replace to see if I could get it to change to a line break: $other = str_replace("%0D%0A", "<br />", $other); .. but that didnt work.
Anyone have any ideas?
Many thanks.
I've only just started getting into PHP but have been involved with a web project to get my experience levels up.
What I have at the moment is a contact form that submits all its information to a php processing page. On the processing page it will *eventually* email the details to a specified E-Mail address but also display the information the user entered on the page as a confirmation.
What I'm having trouble with is displaying the multiline text box fields as multiline on the confirmation page. For example, on the contact form there is a "Any Other Information" field that is multiline. If a user enters information with line breaks or paragraphs these are not represented on the confirmation page.
I have imported all of the information into variables so have $other = $_GET['other'] etc. What I have noticed in the address bar is where the line breaks should be they are represended with the ASCII %0D%0A. Just trial and error I tried using str_replace to see if I could get it to change to a line break: $other = str_replace("%0D%0A", "<br />", $other); .. but that didnt work.
Anyone have any ideas?
Many thanks.
