Jump to content

dynamic link style/text?


Zeradin

Recommended Posts

i have a link to an inbox where if there are new messages it makes it bold and shows the number of new messages like this:

$newpmquery = 'SELECT * FROM pms WHERE pmto = '.$_SESSION['id'].' AND pmread = 0';
			$newpmresult = mysql_query($newpmquery);				
			if (mysql_num_rows($newpmresult) > 0) {
			echo '<a href="inbox.php" target="formload"><strong>Inbox ['.mysql_num_rows($newpmresult).' New]</a></strong>';
			}
							else {
			echo
			'<a href="inbox.php" target="formload">Inbox</a>';
			}

 

i was wondering how i could make it so that when the person reads the message and the pmread becomes 1 that the style on the link would change, either number or back to regular link. I would love it if it happened instantly on the change of the value, but it'd be ok if it was just some sort of reload every regular interval. does anyone know how to do something like this?

Link to comment
https://forums.phpfreaks.com/topic/123325-dynamic-link-styletext/
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.