send an url parameter to server from url (PHP/JavaScript)_
http://nomilead.com/create.php?uid=abc&key=c79a&web_url=http://dinesh707.blogspot.com/
Here im trying to send the url as a parameted "web_url". The shown is an ajax request that sends to a php server back end.
from php end im trying to capture this by
$web_url =开发者_JAVA技巧 $_GET["web_url"];
but it does not work.
Please help me out here.
You need to URLEncode web_url
.
In PHP, that would be
$url = "http://...&web_url=".urlencode("http://dinesh707.blogspot.com/");
in Javascript
url = "http://...&web_url="+encodeURIComponent("http://dinesh707.blogspot.com/");
it must be $_GET
精彩评论