Jump to content

[SOLVED] formatting message problem


shadiadiph

Recommended Posts

I have been making a mail inbox but now i am on the reply to message section problem is getting the return message to display in text in the <texarea>

 

I want when the user hits reply for the original message to appear in the reply textarea box problem is it keeps displaying with all the <br /> tags in place if i just print $message it displays fine like a message fine but when i try to put

 

<textarea name="newmessage"><?=$message?></textarea>

 

the message displays like this.

 

Welcome<br/>to website.com thank you for joining our community<br/><br/>
Please login to your account<br /><br />Your password is ******<br /><br/>

 

 

any ideas i have been through the php manual the only thing i can seem to find are functions that add more <br /> tags and noe that turn the mesage back into readable text??

Link to comment
https://forums.phpfreaks.com/topic/157382-solved-formatting-message-problem/
Share on other sites

erm I am doing that from the user reading the message as <?=$message?> displays fine

 

then adding it to a hidden fiield as name="message" value="<?=$message?>" and posting it back

 

but then when i get the $message= $_POST["message"]; and then put <?=$message?> back into the next part it is full of <br/> I am not adding <br />

ok that is what i am thinking but if that is the case then how do they do it in these forums???

 

Here is another problem I am having is why is this displaying the message twice seems to be displaying the hidden input value too? I have looked at it 100 times seems right?

 

<?php
if ($action=="viewmessage")
{
?>
<table class="mailbox">
<form id="viewmessage" action="messages.php?fid=<?=$fid?>" method="post">
<tr><td><input type="hidden" name="message" value="<?=$message?>" /></td></tr>
<tr><td class="boxhead"><input class="headbutton" type="submit" name="submitreply" value="Reply" /></td></tr>
<tr><td class="viewhead">From: <?=$fromuser?></td></tr>
<tr><td class="viewhead">Date: <?=$daterec?></td></tr>
<tr><td class="viewhead">Subject: <?=$subject?></td></tr>
<tr><td class="spacer"></td></tr>
<tr><td class="messageview"><?=$message?></td></tr>
<tr><td class="boxhead"><input class="headbutton" type="submit" name="submitreply" value="Reply" /></td></tr>
</table>
</form>
<?php
}
?>

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.