Now i have changed my php file a little bit, and changed some
collations in my database, and finally it seems to work !
Thank you very much for your help !!

Here you can see it :
http://www.micmus.dk/phpsqlajax_map1.htm

and my php file :
http://www.micmus.dk/map_data.xml.php


<?php

// Connect to the database
//require($_SERVER['DOCUMENT_ROOT'] . '/db_credentials.php');
require("phpsqlajax_dbinfo.php");
$conn = mysql_connect ('mysql.gigahost.dk', $username, $password);
mysql_select_db($database, $conn);

// Select all the rows in the markers table
$query = "SELECT * FROM markers1 WHERE 1";
$result = mysql_query($query);
if (!$result) {
die('Invalid query: ' . mysql_error());
}

header("Content-type: text/xml");

// Start XML file, echo parent node
echo '<markers>';

// Iterate through the rows, printing XML nodes for each
while ($row = @mysql_fetch_assoc($result)){
// ADD TO XML DOCUMENT NODE
echo '<marker ';

$encoded=$row['name'];
$encoded=htmlspecialchars($encoded);
$encoded=utf8_encode($encoded);
echo 'name="' .$encoded. '" ';

$encoded=$row['address'];
$encoded=htmlspecialchars($encoded);
$encoded=utf8_encode($encoded);
echo 'address="' .$encoded. '" ';

echo 'lat="' . $row['lat'] . '" ';
echo 'lng="' . $row['lng'] . '" ';

//echo 'category="' . $row['type'] . '" ';
echo 'type="' . $row['type'] . '" ';

echo '/>';
}

// End XML file
echo '</markers>';

?>


On 29 Sep., 00:05, Ralph Ames <[EMAIL PROTECTED]> wrote:
> >Now i have changed these things but as you can see here :
> >http://www.micmus.dk/new_phpsqlajax_genxml.php
> >something is wrong ??
>
> There is a missing ? at the end of this
> <?xml version='1.0' encoding='utf-8'>
>
> What collation are you using on your database?
>
> Ralph
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to