Jump to content

breaking line..


corillo181

Recommended Posts

how do i make text come out the wayt hat the user send type it in the typing box.. cuz when they type comething in to the box like this


hi!
i got a question.
how can i make this work?
thank you.

it come out like this

hi! i got a question. how can i make this work? thank you.

when i echo the text out from the query.
Link to comment
Share on other sites

insert
[code]
<?
include_once'../includes/header.php';
include_once'../includes/db.php';

if(isset($_POST['Submit'])){

$mess=$_POST['message'];
$sub=$_POST['sub'];
$rusername=$_POST['username'];
$mess=htmlspecialchars($mess);
$sub=htmlspecialchars($sub);
$mess=mysql_real_escape_string($mess);
$sub=mysql_real_escape_string($sub);
$mess=stripslashes($mess);
$sub=stripslashes($sub);
$mess=nlbr
date("F j, Y, g:i a");

$mem=mysql_query("SELECT user_id FROM tra_users WHERE username='$rusername'")or die(mysql_error());
$ruser_id=mysql_fetch_array($mem);
$today = date("F j, Y, g:i a");   

$sql = mysql_query("INSERT INTO tra_users_pms (to_id,from_id,to_username,from_username,time_sent,subject,message,opened,time_opened) VALUES ('".$ruser_id['user_id']."', '$user_id', '$rusername','$username','$today','$sub','$mess', 'no','')") or die(mysql_error());
if($sql){
echo "done";
}

}
?>
[/code]
output
[code]
<tr>
    <td>
<?
$querypms=mysql_query("SELECT * FROM tra_users_pms WHERE to_username='$username' AND pms_id='".$_GET['viewm']."' ORDER BY pms_id DESC")or die(mysql_error());

if($querypms){
$update=mysql_query("UPDATE tra_users_pms SET opened='yes' WHERE pms_id=".$_GET['viewm'])or die (mysql_error());
}
$echopm=mysql_fetch_array($querypms);
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="tfs">
      <tr bgcolor="#606060">
        <td>From:  <a href="member.php?un=<?=$echopm['from_username']?>"><?=$echopm['from_username']?></a>      | Reply | Subject:<?=$echopm['subject']?></td>
      </tr>
      <tr class="infotxt">
        <td><?=$echopm['message']?></td>
      </tr>
[/code]
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.