0 down vote favorite


I am following the tutorial of google maps to save overlays to mysql: https://developers.google.com/maps/a.../phpsqlinfo_v3 but I cant achieve it with Oracle. If someone can point my errors, this is my code so far:

Code:
function savePolygons(){
    for (var i = 0; i < createdShapes.length; i++){

        var nom_zone  = document.getElementById('nom_zone_' + createdShapes[i].id).value;
        alert(nom_zone)
        var couleur = createdShapes[i].fillColor;
        alert(couleur)
        var code_cs = '711';
        var shapeid_export = createdShapes[i].id;
        alert(shapeid_export)
        var geometry = createdShapes[i];
        alert(geometry)
        var url1 = "oracle_savePolygons.php?nom_zone=" + nom_zone + "&couleur=" + couleur + "&code_cs=" + code_cs + "&shapeid_export=" + shapeid_export + "&geometry=" + geometry;
        downloadUrl(url1, function(data, responseCode){
          if (responseCode == 200 && data.length <= 1) {
            infowindow.close();
          }
        });
    }
}

function downloadUrl(url1, callback) {
  var request = window.ActiveXObject ?
      new ActiveXObject('Microsoft.XMLHTTP') :
      new XMLHttpRequest;

  request.onreadystatechange = function() {
     if (request.readyState == 4) {
        request.onreadystatechange = doNothing;
        callback(request.responseText, request.status);
     }
  };

  request.open('GET', url1, true);
  request.send(null);
 }

 function doNothing() {}
there is the php code of oracle_savePolygons.php, Im using EasyPHP on localhost:

Code:
<?php
require("oracle_dbinfo.php");

$nom_zone =$_GET['nom_zone'];
$shapeid_export = $_GET['shapeid_export'];
$code_cs = $_GET['code_cs'];
$couleur = $_GET['couleur'];
$geometry = $_GET['geometry'];

$conn = oci_connect($username, $password, $database);

$query = oci_parse($conn, 'INSERT INTO test1 (shapeid, nom_zone, code_cs, couleur, geometry) VALUES (:nom_zone, :shapeid_export, :code_cs, :couleur, :geometry)';
oci_bind_by_name($query, ":nom_zone", $nom_zone);
oci_bind_by_name($query, ":shapeid_export", $shapeid_export);
oci_bind_by_name($query, ":code_cs", $code_cs);
oci_bind_by_name($query, ":couleur", $couleur);
oci_bind_by_name($query, ":geometry", $geometry);

oci_execute($query);
oci_commit($conn);
?>