Jump to content

Displaying the data while mouse hover the picture?


bilis_money

Recommended Posts

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.

 

 

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

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>
}
?>

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>";
}
?>

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.