Re: [Google Maps API v2] Re: URL variable to SQL query, creating XML
0 08:59, Rossko <rossko@culzean.clara.co.uk> wrote:
>> request.open("GET", url+"?" + Community_ID, true); //LOL, this
>> is so easy. Passes the variable from the URL to the XML (PHP)
>
> Maybe not so easy as you think ;
> url + "?someargumentname=" + Community_ID
> perhaps?
Yes. It's the bit before the = which is used in $_GET.
If you want
$Community_ID = $_GET['Community_ID']
then you have to send that GET variable with the request:
url + "?Community_ID=" + CommunityID;
Working backwards, the last CommunityID is the Javascript variable;
the one after the ? is the identifier which is passed in the GET
request and is received and used as $_GET['Community_ID']; and the
first one is the PHP variable.
Because they are all the same, it may be easier to see with
// PHP
$C = $_GET['B'];
// Javascript
url + "?B=" + A;
--
You received this message because you are subscribed to the Google Groups "Google Maps API V2" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home