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