Reputation: 33956
I need to pass the variables uid
and siteAurl
with AJAX. How do I do it?
You can see me doing it wrong here:
xmlhttp.open("GET","insert/insert-badge.php?user="uid"&site="+siteAurl,true);
Thanks
Upvotes: 0
Views: 373
Reputation: 9292
xmlhttp.open("GET","insert/insert-badge.php?user=" + uid + "&site=" + siteAurl, true);
The variables uid
and siteAurl
should be encoded with encodeURIComponent()
before they are used in the above URL.
Upvotes: 1