I solved this way, could you tell me if it is correct?
index.html
...
function displayWKT(feature) {
var str = wkt.write(feature);
// not a good idea in general, just for this demo
str = str.replace(/,/g, ', ');
document.getElementById('info').innerHTML = str;
document.getElementById('point').value = str;
}
..
</body>
<form action="process-spatial-query.php">
<input name="geometries" type="hidden" value="" id="point" />
<input type="submit" value="Registra la lesione selezionata"/>
</form>
</html>
process-spatial-query.php.php
....
$geometries = $_GET['geometries'];
$result = mysql_query("INSERT INTO t_spaziale (location) VALUES (
GeomFromText( '$geometries' ) )");
if (!$result) {
die('Invalid query: ' . mysql_error());
...
thanks again!
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/WKT-insert-into-database-tp5486415p5489110.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users