Jump to content

[SOLVED] New mail icon


supermerc

Recommended Posts

Hey, i followed obsidian tutorial for a om system, with special help (thanks again obisidian)

 

And now I want a little envelope icon to show when I have a new message, so I tried something but its not working.

 

<?php
session_start();
      require("config.php");
      require("functions.php");  
	echo '<p>Welcome, '.$_SESSION['s_name'].',</p>';
	echo '<p>You are logged in as '.$_SESSION['s_username'].'.';
	echo '<p><a href="members.php">Members</a>'; 
	echo '<p><a href="inbox.php">Inbox</a>';
	$message = mysql_query("SELECT COUNT(*) FROM myPMs WHERE opened != 'y' AND to_id = '{$_SESSION['s_id']}'") or die ("My SQL Error: <br />". mysql_error());
                $msgs = mysql_fetch_array($message);

if ($msg['COUNT(*)'] > 0) {
  // News Msgs Found
  echo "<img src=\"images/envelope.gif\" /> You have {$msg['COUNT(*)']} new messages.<br />";
	}
	;
	echo '<br><a href="edit_profile.php">My Profile</a>';
	echo '<br><a href="logout.php">Logout</a></br>';
?>

 

Please help thank you

Link to comment
https://forums.phpfreaks.com/topic/42172-solved-new-mail-icon/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.