bilis_money Posted October 20, 2007 Share Posted October 20, 2007 I found some sites that has a picture for instance. When you hover your mouse for instance a popup texts ( alt=" " ), i guess is displayed then the data for example pulled from a MySQL table displaying the $name, $city, $Zipcode on a popup texts while the mouse hover the photo etc. etc... How do they do this is this a combination of php and javascript pulling the data from MySQL table? Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/74043-displaying-the-data-while-mouse-hover-the-picture/ Share on other sites More sharing options...
redarrow Posted October 20, 2007 Share Posted October 20, 2007 yep it is javasript you no that?, but also there the good old css take that root, iver way the browser problams are still there. javasript use onmouse over... css use example http://meyerweb.com/eric/css/edge/popups/demo.html Quote Link to comment https://forums.phpfreaks.com/topic/74043-displaying-the-data-while-mouse-hover-the-picture/#findComment-373810 Share on other sites More sharing options...
bilis_money Posted October 20, 2007 Author Share Posted October 20, 2007 any sample script my friend. thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/74043-displaying-the-data-while-mouse-hover-the-picture/#findComment-373811 Share on other sites More sharing options...
redarrow Posted October 20, 2007 Share Posted October 20, 2007 quick example but there errors ok..... fast asleep lol. <?php $db=mysql_connect("what ever "," name","password"); mysql_connect("databse name",$db); $query="SELECT * from what_ever"; $result=mysql_query($query)or die(mysql_error); while($x=myslq_fetch_assoc($result)){ <a href="location to go to here" onmouseover="alert(" ".$x['what_ever']." "> <img name=NAME src=" ".$x['pic_name']." "> </a> } ?> Quote Link to comment https://forums.phpfreaks.com/topic/74043-displaying-the-data-while-mouse-hover-the-picture/#findComment-373812 Share on other sites More sharing options...
redarrow Posted October 20, 2007 Share Posted October 20, 2007 corrected <?php $db=mysql_connect("what ever "," name","password"); mysql_connect("databse name",$db); $query="SELECT * from what_ever"; $result=mysql_query($query)or die(mysql_error); while($x=myslq_fetch_assoc($result)){ echo"<a href=' ".$x["url"]."' onmouseover='alert(' ".$x["what_ever"]." '> <img name=NAME src=' ".$x["pic_name"]." '></a>"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/74043-displaying-the-data-while-mouse-hover-the-picture/#findComment-373815 Share on other sites More sharing options...
bilis_money Posted October 20, 2007 Author Share Posted October 20, 2007 thanks i'll try to grasp the idea. god bless. Quote Link to comment https://forums.phpfreaks.com/topic/74043-displaying-the-data-while-mouse-hover-the-picture/#findComment-373816 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.