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