Jump to content

[SOLVED] Line breaks?


spires

Recommended Posts

hi Guys.

 

I'm submitting a form and trying to echo out the description.

The description is typed into a text area field.

 

When I echo the value, it does not include the line breaks.

 

So, if I type:

'hello

 

World'

 

it echo out:

'hello world'

 

How do I add the line breaks?

 

<?php
echo $msg = $_POST['message'];
?>

<form name="form1" method="post" action="form_email.php">
<table bgcolor="#FFFFFF"  cellpadding="0" cellspacing="0" width="800" align="center">
<tr>

	<td width="111" align="right">
	<br>
		 <span class="organge_text">SUBJECT:</span><br>			 </td>
	<td width="540" height="25" align="left"><input type="text" name="title" size="25"/>
		<br>
		<br></td>
	<td width="147" align="left"></td>
	</tr>
	<tr>
	<td align="right">
		 <span class="organge_text">MESSAGE:</span> </td>
	<td align="left">
		<textarea name="message" cols="60" rows="20" id="message"><?PHP echo $msg; ?></textarea></td>
	<td align="left"></td>
	</tr>
	<tr>
	<td height="25" align="right">Name<br></td>
	<td height="25"><input type="text" name="name" size="25"/></td>
	<td height="25"> </td>
	</tr>
	<tr>
	<td height="25" align="right">Email<br></td>
	<td height="25"><input type="text" name="email" size="25"/></td>
	<td height="25"> </td>
	</tr>
	<tr>
	<td class="ten_organge" align="center" colspan="3"> 
	<input name="send" value="SEND EMAIL" type="submit">
	<br><br>
	</td>
	</tr>
</table>	
</form>

 

 

Thanks for your help

 

:-)

Link to comment
https://forums.phpfreaks.com/topic/76545-solved-line-breaks/
Share on other sites

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.