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

Link to comment
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.

 

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.

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.