Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $conn = new mysqli("localhost", "root", "blahblah", "blahbla_database");
- $userglobal = $w['user']['username']; // this get username of logged user
- $sql = "SELECT emails FROM users WHERE (`username` = '{$userglobal}')";
- $result = $conn->query($sql);
- if($result->num_rows > 0) {
- while($row = $result->fetch_assoc()) {
- if ($row["emails"] !== NULL) {
- echo "<div class='list-group'>";
- echo "<a href='./mail' target='_blank' class='list-group-item list-group-item-action'>";
- $mail_showed = nl2br($row["emails"]);
- $mail_showed = str_replace('n', "<br />", $mail_showed);
- $mail_showed = str_replace('zn', "", $mail_showed);
- echo $mail_showed;
- echo "<span class='badge badge-primary badge-pill'>".CountNewMails($mail_var)."</span></a>"; // Get new mails in number then show it
- echo "</div>";
- } else { echo "<h5 class='text-center'>".$w['user']['username']." You dont have yet mail</h5>";}
- }
- }
- ?>
- <div class='list-group'>
- <a href='./mail' target='_blank' class='list-group-item list-group-item-action'>usermail@domain.com
- <span class='badge badge-primary badge-pill'>14</span></a>
- </div>
- <div class='list-group'>
- <a href='./mail' target='_blank' class='list-group-item list-group-item-action'>usermail@domain.com<br>2mail@domain.com
- <span class='badge badge-primary badge-pill'>14</span></a>
- </div>
- <div class='list-group'>
- <a href='./mail' target='_blank' class='list-group-item list-group-item-action'>usermail@domain.com
- <span class='badge badge-primary badge-pill'>14</span></a>
- <a href='./mail' target='_blank' class='list-group-item list-group--item-action'>2mail@domain.com
- <span class='badge badge-primary badge-pill'>99</span></a>
- </div>
Add Comment
Please, Sign In to add comment