I've got a webpage with a series of hotspots defined (I'll change them to buttons later). When I click on a particular hotspot, I'd like data from a mysql db to be loaded into the main part of the page. Here is how I have defined the hotspot - and I'm passing data to the function:
<area shape=....blah blah ....onMouseOver=<?php getData(data) ?> >
<?php
function getData(date) {
connect to db, use the data passed to get data my db, put in $name field;
data = $name
}
?>
In the middle of my page, I have a layer for the data:
<p><?php echo "here is my $name"; ?> </p>
It is not working at all. First, is my logic ok? I really want to keep the data on the same page and save the user from loading page after page. Any ideas about what I am doing wrong? TIA.