Hi,

I have been playing with the InfoWindow Database Saver and am having
no luck with the php side of things. The following code keeps
returning the error "Undifined index for lines 4 to 7". Have I missed
anything obvious, or can anyone provide the script which may work?

Thanks

<?php

// Gets data from URL parameters
$name = $_GET['name'];
$lat = $_GET['lat'];
$lng = $_GET['lng'];
$type = $_GET['type'];

// Opens a connection to a MySQL server
mysql_connect("localhost","root");

// Set the active MySQL database
$db_selected = mysql_select_db("EIAWEBGIS");
if (!$db_selected) {
  die ('Can\'t use db : ' . mysql_error());
}

// Insert new row with user data
$query = sprintf("INSERT INTO markers " .
         " (id, name, lat, lng, type ) " .
         " VALUES (NULL, '%s', '%s', '%s', '%s');",
         mysql_real_escape_string($name),
         mysql_real_escape_string($lat),
         mysql_real_escape_string($lng),
         mysql_real_escape_string($type));

$result = mysql_query($query);

if (!$result) {
  die('Invalid query: ' . mysql_error());
}

?>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" 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-for-flash?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to