Need a PHP and MySQL Guru !

Electronic Punk

willalwaysbewithyou
Staff member
Political Access
Joined
2 Dec 2001
Messages
18,694
Ok I need a quick hand as my crash course by myself of PHP and MySQL is letting me down!

Here is the current code

Code:
<?
$content = "";
$result = mysql_query("SELECT threadid, title, lastpost FROM thread WHERE forumid<>'13' ORDER BY lastpost DESC limit 5");
while (list($threadid, $title, $lastpost) = mysql_fetch_row($result)) {
	if (strlen($title)>'25') {
		$title = substr($title, 0, 22);
		$title .="...";
	}
	$content .= "<font class=tiny><a href=\"./forum/showthread.php?&threadid=".$threadid."&goto=newpost\" target=\"_blank\">".$title."</a><br>";
}
$content .= "";
?>

Now what I want to do is add this

Code:
title=\"$title\"

except modified a little so on a mouseover the title will display the FULL topic name if it is over 25 characters long... Anyone got any ideas?
 
Ok I managed to do it myself, in case anyone was actually trying to do it, the changes I am wanting are indicated in bold:

Code:
<?
$content = "";
$result = mysql_query("SELECT threadid, title, lastpost FROM thread WHERE forumid<>'13' ORDER BY lastpost DESC limit 5");
while (list($threadid, $title, $lastpost) = mysql_fetch_row($result)) {
[b]$fulltitle = $title;[/b]	
if (strlen($title)>'25') {
		$title = substr($title, 0, 22);
		$title .="...";
		
	}
	$content .= "<font class=tiny><a href=\"./forum/showthread.php?&threadid=".$threadid."&goto=newpost\" [b]title=\"$fulltitle\"[/b] target=\"_blank\">".$title."</a><br>";
}
$content .= "";
?>
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,496
Members
5,625
Latest member
vinit
Back