Can you please show me ,how to pass the java script array to the php . is it this way.
$.post("php_mysql_write.php", {datageo: shapes});
and after ur php script .. but php say's
Warning: mysqli::prepare()
[mysqli.prepare]: Couldn't fetch mysqli in
C:\xampp\htdocs\blitz-gmap-editor-master\php_mysql_write.php on line
25
Fatal error: Call to a member function bind_param() on a non-object
in C:\xampp\htdocs\blitz-gmap-editor-master\php_mysql_write.php on
line 26 please.
i used ur code
<?php $mysqli = new mysqli(/*args*/); $stmt =
$mysqli->prepare('INSERT INTO `tableName`(`columnName`) VALUES
(?)'); $stmt->bind_param('s', $json);
foreach($_POST['shapes'] as $value){ $json = json_encode($value);
$stmt->execute(); } ?>
Dr.molle's answer on
How to save a Google maps overlay shape in the database?