Can't save waypoints in Google maps v3

旧街凉风 提交于 2019-12-22 01:26:12

问题


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:

  1. create a DB with the name mapdir
  2. 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)
  3. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!