Jump to content

echo returns in form field not the <br>


jasonc

Recommended Posts

I am trying to get the actual returns to show in the form fields and not the <br>

 

i have the form read the field and convert \r\n to <br> to store in the database, but when the i have the form shown later on with the content of the database it shows the <br> and not the newlines like it was entered each on a seperate line.

Link to comment
Share on other sites

actually i was not converting them before inserting, i am converting them before displaying.

 

but i get the <br> show in the form field and not the return (next line)  all the text shows on the same line with <br> between all the text instead of on each line as it was typed

Link to comment
Share on other sites

ok my data is added to the database using the mysql_real_escape_string method and when the data is got back later on and displayed it shows the \r\n, so i have these converted to <br> but what ever i use i get either \r\n or <br> and not a return in the textarea

Link to comment
Share on other sites

i seem to have solved this by not converting anything and leaving it as it is shown in the database, not sure what else i done to get this to work but now the returns are showing like they were typed in.

 

BUT...

 

i have the other problem of the £ not showing in the emails as a £ it is shown as £

 

how do i get this character to show only as £ and not £

Link to comment
Share on other sites

my emails have the following format...

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
the body of the email that contains the £ sign
</body>
</html>

 

but the email shows all the £ as £

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.