Hi, I have an image map mixed in with php, and it won't click when I click the mouse on it, it won't work. Any help greatly appreciated. Thanks. Derek
here is the code where I use it.
Code:
if(isset($_GET['newLocation']))
{
$_SESSION['current_location']=$_GET['newLocation'];
}
if(!isset($_SESSION['current_location']) && !isset($_SESSION['current_background']) && !isset($_SESSION['currentMonster']))
{
$_SESSION['current_location'] = 0;
$_SESSION['current_monster'] = 0;
$_SESSION['current_background'] = 0;
}
if($_SESSION['current_location'] != 0) {
if(!isset($_SESSION['current_background']) && !isset($_SESSION['current_monster']))
{
$_SESSION['current_monster'] = 0;
$_SESSION['current_background'] = 0;
}
if(isset($_GET['further']))
{ //below is- inside the locations array, teardrop ocean (1) the background image is 4(example)+1 is set, then
//do this
if(isset($locations[$_SESSION['current_location']]['background_images'][$_SESSION['current_background']+1])) {
$_SESSION['current_background']+=1;
}
if(isset($locations[$_SESSION['current_location']]['monster_images'][$_SESSION['current_monster']+1])) {
$_SESSION['current_monster']+=1;
}
}
elseif(isset($_GET['back']))
{
if(isset($locations[$_SESSION['current_location']]['background_images'][$_SESSION['current_background']-1])) {
$_SESSION['current_background']-=1;
}
if(isset($locations[$_SESSION['current_location']]['monster_images'][$_SESSION['current_monster']-1])) {
$_SESSION['current_monster']-=1;
}
}
// I dont have any $_SESSION['background'] var
//$currentBackground=$_SESSION['background'][$_SESSION['current_background']];
$currentBackground = $locations[$_SESSION['current_location']]['background_images'][$_SESSION['current_background']];
//I dont have any $_SESSION['monster'] var
//$currentMonster=$_SESSION['monster'][$_SESSION['current_monster']];
$currentMonster=$locations[$_SESSION['current_location']]['monster_images'][$_SESSION['current_monster']];
} else {
//?newLocation=1 means set it to Teardrop ocean.
$currentBackground = '
<img src="aradia.jpg" width="256" height="328" border="0" usemap="#Map" />
<map name="Map" id="Map">
<area shape="rect" coords="5,176,81,249" href="?newLocation=1"/>
</map>';
$currentMonster = '';
}
|