corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Yo more php help needed


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Yo more php help needed
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
25th Mar 07 at 16:52   View Garage View User's Profile U2U Member Reply With Quote

http://www.vagweb.co.uk/map.php

if you hover over the dot at the top on the first image you get a link, and hover over the second in the second image and you get a link.

I cant however think of a way of laying the image link maps on the same image, as the image uses a set map id and without repeating the image i cant think of a way of changing this. Heres my code, you may understand better

$sql1 = mysql_query("SELECT * FROM map");
$m="0";

while($row2 = mysql_fetch_array( $sql1 ))
{
echo '<img src="http://www.vagweb.co.uk/map2.php" width="513" height="550" border="0" usemap="#Map'.$m.'" />';



echo '<map name="Map'.$m.'" id="Map'.$m.'"><area shape="circle" coords="'.$row2['coordx'].','.$row2['coordy'].',10" href="#" /></map>';
echo $row2['coordx'];
echo $row2['coordy'];

$m++;
};


If i put the echo '<img src="http://www.vagweb.co.uk/map2.php" width="513" height="550" border="0" usemap="#Map'.$m.'" />'; out side the loop it wont work as the map Id wont match
Ian
Site Administrator

Avatar

Registered: 28th Aug 99
Location: Liverpool
User status: Offline
25th Mar 07 at 16:55   View Garage View User's Profile U2U Member Reply With Quote

I'm not clear here - two map.php scripts?
Steve
Premium Member

Avatar

Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
25th Mar 07 at 19:08   View Garage View User's Profile U2U Member Reply With Quote

sorry ian, one generates the image with the dots on the other generate the image link maps to provide a link to profiles.

is working now, just need to integrate my full database as it only contains a couple of records atm.

http://www.vagweb.co.uk/map.php

if you hover over the dot you get the users username and link to theh profile

also need to source a better map picture lol!


[Edited on 25-03-2007 by Steve]

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
Car power help needed AdiSRI General Chat 1 557
19th May 04 at 22:59
by AdiSRI
 
ouch! surgery on the corsa GLSi GUY North West and North Wales 11 299
17th Nov 04 at 23:15
by Mo
 
Disc Brake Conversion! C2VXL General Chat 14 730
28th Jul 05 at 16:06
by broster
 
Anyone know PHP? Bit of help needed... liamC Geek Day 38 1455
24th Nov 06 at 23:02
by MarkPW
 
Info about swapping from 1.0 12v to 2.0 16v redtop Dave-Creations Help Zone, Modification and ICE Advice 8 324
3rd Mar 07 at 18:00
by Dave-Creations
 

Corsa Sport » Message Board » Off Day » Geek Day » Yo more php help needed 29 database queries in 0.0135059 seconds