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
https://forums.phpfreaks.com/topic/152832-solved-need-help/
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
https://forums.phpfreaks.com/topic/152832-solved-need-help/#findComment-802590
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
https://forums.phpfreaks.com/topic/152832-solved-need-help/#findComment-802606
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
https://forums.phpfreaks.com/topic/152832-solved-need-help/#findComment-802629
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.