I'm trying to do a custom google map thing where users can enter some details in a form, this is then uploaded to a Mysql database. This is for a little google map thing I'm doing to show more details about the coppermine photo they have upload which can then link from the map to the photo.
I had the code working well but suddenly it seemed to go wrong and now I have been staring at it for ages and my eyes are going wonky.
it returns the error
Parse error: parse error, unexpected ';' in /data/members/paid/w/i/windsurf.me.uk/htdocs/www/usermap.php on line 42
here is the code
<?php
$link = mysql_connect("localhost", "********", "********") or die("Could not connect: " . mysql_error());
mysql_selectdb("windsurf_me_uk_4",$link) or die ("Can\'t use dbmapserver : " . mysql_error());
$result = mysql_query("SELECT * FROM locations",$link);
if (!$result)
{
echo "no results ";
}
while($row = mysql_fetch_array($result))
{
echo "var point = new GLatLng(" . $row['field_10'] . "," . $row['field_9'] . ");\n";
echo "var marker = createMarker(point, '" . addslashes($row['field_2'] . "<br />" . $row['field_3'] . "<br />" . $row['field_4'] . "<br />" . $row['field_4'] . "<br />" . $row['field_6'] . "<br />" . $row['field_7'] . "<br />" . $row['field_8'] . " <br /><a href=\"" . $row['field_11'] . "\">" . $row['field_11'] . "</a><br/>" . $row['field_12'] . "<br />');\n";
echo "map.addOverlay(marker);\n";
echo "\n";
}
mysql_close($link);
?>
line 42 is the echo "var marker line.
Can any of you see what is going on here?
[Edited by Sami]:
Mysql Username/password Removed as requested