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
https://forums.phpfreaks.com/topic/238965-echo-returns-in-form-field-not-the/
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

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

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 £

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 £

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.