Jump to content

[SOLVED] Need help


LOUDMOUTH

Recommended Posts

I have this as my reply message code it inserts the dashes as a line break to separate the Original message from the reply.  How can I get rid of the dashes and just have 2 break lines instead?

 

\n ------------------------------------------------------------------------------------------------------ \n

 

<td width='85%' colspan='3'><textarea name='msgtext' cols='53' rows='7'><?php echo ($_GET['reply'] != "") ? " \n ------------------------------------------------------------------------------------------------------ \n ".$worked2['msgtext'] : "";  ?></textarea></td>

Link to comment
Share on other sites

I think iarp may have misread your post, I don't think <hr> is what you need (unless I've misread your post :P)

 

Instead of;

 

<td width='85%' colspan='3'><textarea name='msgtext' cols='53' rows='7'><?php echo ($_GET['reply'] != "") ? " \n ------------------------------------------------------------------------------------------------------ \n ".$worked2['msgtext'] : "";  ?></textarea></td>

 

Have:

 

<td width='85%' colspan='3'><textarea name='msgtext' cols='53' rows='7'><?php echo ($_GET['reply'] != "") ? "<br><br>".$worked2['msgtext'] : "";  ?></textarea></td>

Link to comment
Share on other sites

<td width='85%' colspan='3'><textarea name='msgtext' cols='53' rows='7'><?php echo ($_GET['reply'] != "") ? "\r\n \r\n".$worked2['msgtext'] : "";  ?></textarea></td>

 

Give that a try and see what comes of it. (Granted \n\n should have worked unless you are not making it clear on exactly what you want).

Link to comment
Share on other sites

Here is what I mean.  in the first image it shows you the dashes it enters into the text area.

 

in the second is the view of a reply and as you can see it enters those dashes, i just want it to be a blank space in between the message and reply :)

 

sample.jpg

 

sample2.jpg

Link to comment
Share on other sites

Here is the View message page, where would I add the nl2br code?

 

<?
include 'header.php';
?>
<tr><td class="contenthead">Mailbox</td></tr>
<tr><td class="contentcontent">
<table width='100%'>
<?
$result = mysql_query("SELECT * from `pms` WHERE `id`='".$_GET['id']."'");
$row = mysql_fetch_array($result);
     $from_user_class = new User($row['from']);
if ($_GET['id'] != ""){
    if (strtoupper($row['to']) == strtoupper($user_class->username)) {
    echo "
					<tr>
						<td width='15%'>Subject:</td>
						<td width='45%'>".$row['subject']."</td>
						<td width='15%'>Sender:</td>

						<td width='25%'>".$from_user_class->formattedname."</td>
					</tr>
					<tr>
						<td>Recieved:</td>
						<td colspan='3'>".date(F." ".d.", ".Y." ".g.":".i.":".sa,$row['timesent'])."</td>
					</tr>
					<tr>

						<td colspan='3' class='textm'><b>Message</b>:<br><br>".wordwrap($row['msgtext'], 100, "\n", 1)."
				    	</td>
					</tr>
					<tr>
					<td colspan='4' align='center'><a href='pms.php?delete=".$row['id']."'>Delete</a> | <a href='pms.php?reply=".$row['id']."'>Reply</a></td>
					</tr>
					<tr>
						<td colspan='4' align='center'><a href='pms.php'>Back To Mailbox</a></td>
					</tr>

";
$result2 = mysql_query("UPDATE `pms` SET `viewed` = '2' WHERE `id`='".$row['id']."'");
}
}
?>

</table>
</td></tr>
<?
include 'footer.php';
?>

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.