问题
I downloaded this project:
http://vikku.info/programming/google-maps-v3/draggable-directions/saving-draggable-directions-saving-waypoints-google-directions-google-maps-v3.htm
To se how to save waypoints, I opened, the html, and tryied to save the waypoint, but it don't work, I dont know if i need to do something in SQL or not, I just tryied to make it works, please help me if you had sucess to make it works.
回答1:
You have to:
- create a DB with the name mapdir
- create a table with the name mapdir inside this DB, the table should have only 1 field named value with the type text (there is a file mapdir.sql inside the ZIP-file, you may use it to create the table)
- inside process.php you must edit line#5 and set the correct values for
mysql_connect(servername,username,password)
You also should change process.php,Line#3 to
@$data = $_REQUEST['mapdata'];
....otherwise you later will not be able to load the waypoints when error_reporting is on.
But however, I wouldn't suggest to use this project like it is, there isn't any protection against SQL-injection.
来源:https://stackoverflow.com/questions/11474099/cant-save-waypoints-in-google-maps-v3