Gubbins Posted November 5, 2008 Share Posted November 5, 2008 Hello, I am sure this one is so easy that i am looking to deep. Here is my php <? while ($fams = mysql_fetch_assoc($fam)){ $name = $fams['name']; $loc = $fams['location']; $name = "<a href=\"famprofile.php?name=".$name."\">".$name."</a>"; ?> Other code that doesnt work <center><img src=images/worldmap/l8p1.jpg><img src=images/worldmap/l8p2.jpg><title=?php echo ($loc)($name); ?> When the mouse is hovered over the pic i would like to display the location and name. Does anyone know where i am going wrong please? Link to comment https://forums.phpfreaks.com/topic/131544-solved-title/ Share on other sites More sharing options...
iversonm Posted November 5, 2008 Share Posted November 5, 2008 first, always open php with a <?Php tag also do this title="<?Php echo $loc.$name; ?>" or if you want a space inbetween the two title="<?Php echo $loc.' '.$name; ?>" try that Link to comment https://forums.phpfreaks.com/topic/131544-solved-title/#findComment-683199 Share on other sites More sharing options...
Yesideez Posted November 5, 2008 Share Posted November 5, 2008 First, always use <?php and not <? <?php while ($fams = mysql_fetch_assoc($fam)) { $name = $fams['name']; $loc = $fams['location']; $name = '<a href="famprofile.php?name='.$name.'">'.$name.'</a>'; ?> I've not changed much so can't see why it wasn't working - would be handy to say what it isn't doing what you want it to do instead of saying "it doesn't work" <center><img src="images/worldmap/l8p1.jpg"><img src="images/worldmap/l8p2.jpg"><title=<?=$loc.$name?> Again, no idea what you're trying to do here, can you explain a little better? Link to comment https://forums.phpfreaks.com/topic/131544-solved-title/#findComment-683202 Share on other sites More sharing options...
Gubbins Posted November 5, 2008 Author Share Posted November 5, 2008 first, always open php with a <?Php tag also do this title="<?Php echo $loc.$name; ?>" or if you want a space inbetween the two title="<?Php echo $loc.' '.$name; ?>" try that Thank you, The mouse over now works in firefox but in I.E. (it distorts the picture) as there is 2 pics next to each other and the one on the right is the one i would like the title to show! Any Ideas? Link to comment https://forums.phpfreaks.com/topic/131544-solved-title/#findComment-683216 Share on other sites More sharing options...
Yesideez Posted November 5, 2008 Share Posted November 5, 2008 I see what you want... <center><img src="images/worldmap/l8p2.jpg" title="<?=$loc.$name?>"></center> Link to comment https://forums.phpfreaks.com/topic/131544-solved-title/#findComment-683223 Share on other sites More sharing options...
Gubbins Posted November 5, 2008 Author Share Posted November 5, 2008 I see what you want... <center><img src="images/worldmap/l8p2.jpg" title="<?=$loc.$name?>"></center> Works great Thank you very much Link to comment https://forums.phpfreaks.com/topic/131544-solved-title/#findComment-683235 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.