Jump to content

geatzo

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by geatzo

  1. ?> <script type="text/javascript"> window.location.href = 'http://www.google.com.au/'; </script> <?php This does not make the headers work but its a work around.
  2. The part im stuck on is displaying all the users who messaged so lets say i have 2 mails from user1 and 1 mail; from user 2 my coding will show all 3 mails. What i need is for my coding to show 2 mails because of course there are 2 users mailing me not 3 ( even tho there are 3 results) i hope this makes sense. So i simply trying to find a way to display the users who mailed me but at the moment its showing user1 user1 user2 instead i need it to show user1 user2 its showing user1 twice because there are 2 messages from user 1
  3. Im trying to make a php message script i can output the message's but im having a issue with grouping them Here is a photo of the html https://prnt.sc/WtJhNnteYaq1 But im outputting the message's and if the same person sends 2 message's it shows has separate https://prnt.sc/xSAIT9cQlHt3 I can ether just output all the from usernames on the left side then when the user clicks a chat head the messege will do a simple search where that username but again it will show muti chat heads for the same users Here is my table https://prnt.sc/0hRyCNozTlpZ $stmt2m2 = $db->prepare('SELECT * FROM messages WHERE recipient_username = ? LIMIT 4 '); $stmt2m2->execute( array($_SESSION['username'] ) ) ; $row2m2 = $stmt2m2->fetchAll(); foreach($row2m2 as $users2) { ?> <a href="#" class="media"> <div class="item-img"> <img src="media/figure/notifiy_1.png" alt="Notify"> </div> <div class="media-body"> <h6 class="item-title"><?php echo $users2['sender_username'] ; ?></h6> <div class="item-time"><?php echo $users2['date'] ; ?></div> <p><?php echo $users2['message'] ; ?></p> </div> </a> <?php } ?>
×
×
  • 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.