微信公众号获取用户位置定位信息入库asp代码,可以获取微信用户的坐标和地址信息入库,代码简洁:
<% if request(“action”)="" then %>
<div id="p_LatLng"></div><div id="p_Address"></div>
<%
sqlfg=“select * from yuyue where openid=’”&newopenid&"’"
set rsfg=conn.execute (sqlfg)
if not rsfg.eof then’已经有了
%>
<% conn.close set conn=nothing %> <% elseif request("action")="save" then%> <% userID=request.Form("userID") wx_name=request.Form("wx_name") hyname=request.Form("hyname") hypic=request.Form("hypic") qd_date=now() openid=request.Form("openid") map=request.Form("map") mapid=request.Form("mapid")
Values = Array(userID,wx_name,hyname,hypic,qd_date,openid,map,mapid)
Sql = “Insert Into yuyue values(?,?,?,?,?,?,?,?)”
call SqlHelper(Sql,Values)
conn.close
set conn=nothing
call infoopen(“签到成功”,“index.asp”)
%>
<% end if %>