Jump to content

tallpaul

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by tallpaul

  1. I'm in. Big gracais! Cheers ...
  2. Fair enough. I'll add it to my Google Calendar every 3rd week.
  3. Wondering if there is a place/way I can track my days when I logged in somewhere
  4. I haven't been around much lately to work on my project. Have some time and I see it's been locked off for the time being. Thanks!
  5. Well was reading through my script and saw that i had misspelled latitude and it now seems to retrieve the data, but doesn't display on Google Maps though. Progress! Thanks for the heads up on the server name for sure though. .
  6. Interesting as it definately was in the email. I wonder if it stripped out the PHP code because it thought it was email-meta data or something. Anyway, I pulled it from the web so it has come comments in it the original author wrote as well. here it is: <?php // Define the database info // -- Modify for your case -- define("DB_SERVER", "tektours.heliohost.org/localhost/"); define("DB_USER", "XXXXXXXX"); define("DB_PASS", "XXXXXXX"); define("DB_NAME", "XXXXXXX"); define("DB_TABLE", "XXXXXXX"); // Important so that the filetype is correct header("Content-type: application/xml"); // Print the head of the document printf("<?xml version=\"1.0\" encoding=\"UTF-8\"?> <kml xmlns=\"http://earth.google.com/kml/2.0\"> <Document>"); // You can include a default map view using the following lines // -- Delete this block if you don't need it -- printf("<LookAt> <latitude>42.390185</latitude> <longitude>-72.528412</longitude> <range>1200</range> <tilt>0</tilt> <heading>0</heading> </LookAt>"); if ($db = mysqli_connect(DB_SERVER, DB_USER, DB_PASS)) { mysqli_select_db($db, DB_NAME); $query = "SELECT id, name, web_display, latitute, longtitude FROM " . DB_TABLE; // You could add some WHERE statements here to filter the data // DESC means newest first $query .= " ORDER BY id DESC"; // Finally query the database data $result = mysqli_query($db, $query); // Now iterate over all placemarks (rows) while ($row = mysqli_fetch_object($result)) { // This writes out a placemark with some data // -- Modify for your case -- printf(' <Placemark id="%d"> <name>%s says:</name> <description>%s</description> <Point> <coordinates>%f,%f</coordinates> </Point> </Placemark>', htmlspecialchars($row->id), htmlspecialchars($row->name), htmlspecialchars($row->web_display), htmlspecialchars($row->longitude), htmlspecialchars($row->latitude) ); }; // Close the database connection mysqli_close($db); }; // And finish the document printf(" </Document> </kml>"); ?> This is the error message I get: <kml><Document><br/><b>Warning</b>: mysqli_fetch_object() expects parameter 1 to be mysqli_result, boolean given in <b>/home/pschmidt/public_html/ski_areas.php</b> on line <b>47</b><br/></Document></kml> I do a SQL all day but am brand new to php.
  7. Just found the MIME Types option in the control panel. Onward!
×
×
  • Create New...