Jump to content

Personal Message system


Ads

Recommended Posts

Hey, I am trying to create a Personal Message system for my website. Creating it is no issue, But I am trying to add the feature so when you view the Message and go to reply to adds a "----------Original Message---------" To indicate the different Messages between teh two users.

 

This is the code I am using to add the break to the $msg which is then submitted to the Database

	$msg=$_POST['msg'];
		$msg="<br><br>---Original Message---<br>".$msg;

 

And this is the code I am using to Convert the string from the Database and it being displayed into a <textarea>

			$select_mail = mysql_query("select * from mailbox where id='$id'");
	$b = mysql_fetch_array($select_mail);
	$h = $b['msg'];
	$h = str_replace("<br>", "\n", $h);

 

It Displays It within HTML Fine, But it Displays Nothing when I try and put it into the <Textarea> for the user to reply with.

 

Any Help would be Great, Sorry if it is a Bit Confusing =(

 

 

Link to comment
https://forums.phpfreaks.com/topic/202040-personal-message-system/
Share on other sites

If you want the original message to appear withing the text box that you write the reply, try this:

 

<textarea  name=\"?\" rows=? cols=?>$msg</textarea>

 

Obviously fill in the question marks.

 

However, it would probably be better to show the original message above the reply text box, maybe just put a border around it and different background colour to highlight it.

If you want the original message to appear withing the text box that you write the reply, try this:

 

<textarea  name=\"?\" rows=? cols=?>$msg</textarea>

 

Obviously fill in the question marks.

 

However, it would probably be better to show the original message above the reply text box, maybe just put a border around it and different background colour to highlight it.

 

Okay, That does display the text within the box, But I want it to have Line Breaks, which only display as /n but i want them to be an acctual newline.

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.