Jump to content

Two issues - Bold text? Quick replying sends to myself?


TeddyKiller

Recommended Posts

I have noticed that sometimes mails come up.. and in the sent messages, or in the inbox if done correctly.. all the text below comes up in bold. Though when you view the mails.. it looks fine.

http://i278.photobucket.com/albums/kk87/JeanieTallis/hbbbb.png - Image of Issue

Number 1 displays that its like in sent messages/inbox. etc

Number 2 displays what the message is like when viewed.

I'm not sure what the issue is, it may be in the code or not. You'll have to tell me.

 

The second issue, when you view a message you sent.. at the bottom is a quick reply. This for some reason.. sends a mail to myself. I think the problem is.. viewing a message sent to you, and viewing a message you sent to someone else uses the same view message case. So if you sent a message.. the from: field will actually be your username.. there for you end up sending it to yourself.

 

I'm not going to provide any code yet, don't know which parts are nessecary.

How can i fix the two issues?

 

Cheers

Link to comment
Share on other sites

Here is the sent messages, the inbox is the same.. just with a slightly different query.

     case "sent":
     
          echo '<a href="mail.php">Inbox Messages</a> - <a href="mail.php?act=sent">Sent Messages</a> - <a href="mail.php?act=send">Send Message</a><br />';
        echo '<fieldset><legend>Sent Messages</legend><form name="myForm" action="" method="post">';
        
        $q = mysql_query("SELECT * FROM `sent_messages` WHERE from_status='0' AND from_id='$user->id' order by `date` desc");
           if(mysql_num_rows($q) > 0){
           while($r = mysql_fetch_array($q)){
              $wr = mysql_query("SELECT * FROM `users` WHERE id='".$r['to_id']."'");
              $rw = mysql_fetch_array($wr);
              echo '
              <div style="text-align:left; border-bottom:1px solid #e1e3d3; padding-bottom:5px;">
              <div id="topmail">Date: '.date('d.m.y \a\t H:i', $r['date']).'<br />To: <a href="#">'.ucwords($rw['username']).'</a> - Subject: <a href="mail.php?act=viewmessage&hash='.$_SESSION['hash'].'&msgid='.$r['id'].'">'.ucwords($r['subject']).'</a></div>
              <div id="mail">
              <div style="margin-right:50px;">'.substr($r['message'],0,100).'</div>
              </div>
              </div><br />';
           }
        } else { echo 'You currently have no sent messages. Get sending!'; }
        
        echo '</fieldset></form>';
     
     break; 

Link to comment
Share on other sites

No. They are all closed. I tidied it up a bit.

echo '
<div style="text-align:left; border-bottom:1px solid #e1e3d3; padding-bottom:5px;">
    <div id="topmail">
        Date: '.date('d.m.y \a\t H:i', $r['date']).'<br />To: <a href="#">'.ucwords($rw['username']).'</a> - Subject: 
        <a href="mail.php?act=viewmessage&hash='.$_SESSION['hash'].'&msgid='.$r['id'].'">'.ucwords($r['subject']).'</a>
    </div>
    <div id="mail">
        <div style="margin-right:50px;">' . substr($r['message'],0,100) . '</div>
    </div>
</div><br />';

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.