TeddyKiller Posted April 17, 2010 Share Posted April 17, 2010 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 Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted April 17, 2010 Author Share Posted April 17, 2010 Does anyone know the solution to this, needing it solved quickly Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted April 17, 2010 Author Share Posted April 17, 2010 The bold text seems to be related the --- Why? .. In the image, if I remove the first --- it works, put it back in- It doesn't. If I remove the second --- it works, put it back in- it doesn't. Why is --- making bold text? Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted April 17, 2010 Share Posted April 17, 2010 Nobody is going to be able to answer this with any degree of certainty without seeing the code. Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted April 17, 2010 Author Share Posted April 17, 2010 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; Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted April 17, 2010 Author Share Posted April 17, 2010 --- Creates the bold text, but neither - and -- do. The --- is catching onto something causing a new bold tag.. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted April 17, 2010 Share Posted April 17, 2010 The only thing that jumps out at me is that you have 5 <div> open tags, and only 3 </div> closing tags. Might be a style carrying over to the next <div>, unless they're closed elsewhere. Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted April 17, 2010 Author Share Posted April 17, 2010 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 />'; Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted April 17, 2010 Author Share Posted April 17, 2010 <div style="margin-right:50px;">' . substr($r['message'],0,100) . '</div> If I put a period (.) before the closing div.. the boldness goes away... So does ---< make bold or something.. Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted April 17, 2010 Author Share Posted April 17, 2010 IT DOES! I just tested it. See it for yourself. echo '<div>---</div><div>string here</div>'; Now how do I fix it.. EDIT: Also just found out.. it's a HTML tag. I can't find a closing tag though. Could this be a HTML bug? Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted April 17, 2010 Share Posted April 17, 2010 I just ran it locally, and it doesn't make it bold in Safari or Firefox. Might be a bug in whatever browser you're using. Quote Link to comment Share on other sites More sharing options...
TeddyKiller Posted April 17, 2010 Author Share Posted April 17, 2010 I'm using Firefox 3.6 .. I guess I'll replace the 3 --- with 4 of them. Ok.. for the other issue, what do you reckon I should do with quick reply sending to myself. I thought of having seperate cases, case inbox and case sent Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.