/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Highlite map

I have a jpg of a floor map with everyone marked on it. I have a list of everyone that I have put a “mapit” next to their name to take you to the map. I am trying to highlite the area where the person sits.

the link on the mapit is:

[code=php]echo ‘<td><a href=”‘.$rows[‘floor’].’.php?id=’.$rows[‘id’].'”>mapit</a></td>’;[/code]

on the map i have this coding but both show up highlited instead of the appropriate one.

[code=php]<?
$id=$_GET[‘id’];
$room=$_GET[‘room’];

if ($room=18121)
{ echo ‘<div style=”width: 50px; height: 67px; position: absolute; left: 672px; top: 654px; background-color: #ffff00″></div>’; }
if ($room=18120)
{ echo ‘<div style=”width: 72px; height: 48px; position: absolute; left: 723px; top: 654px; background-color: #ffff00″></div>’; }
?>
[/code]

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@MindzaiApr 16.2010 — The equality operator is ==. You are using the assignment operator (=).
Copy linkTweet thisAlerts:
@beylahauthorApr 16.2010 — ok so i changed the operator and neither highlite show up (the 18120) should

[code=php]<?
$id=$_GET['id'];
$room=$_GET['room'];

if ($room==18121)
{ echo '<div style="width: 50px; height: 67px; position: absolute; left: 672px; top: 654px; background-color: #ffff00"></div>'; }
if ($room==18120)
{ echo '<div style="width: 72px; height: 48px; position: absolute; left: 723px; top: 654px; background-color: #ffff00"></div>'; }
?> [/code]
×

Success!

Help @beylah spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...