window.open("http://www.abc.com/postcomment.php?nID="+id + "&song_name=" +songname + "&artist_name=" +artistname);
Inside variable have Arabic character (UTF-8) and Url should like this:
http://www.one12two.com/postcomment.php ... ame=ويتميز ايو&artist_name=مزيج المسا
Before opening the page checked the user log in information. If not then went to login page after user successful log in it will come to last page from where user are giving comments. But the problem is that when I read url from urlencode() and after decode in php. It's working in mozila firefox but in internet explorer is not working. Php code is mentioned below:
Code: Select all
function getCurrentPageUrl()
{
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on")
{
$pageURL .= "s";
}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80")
{
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
}
else
{
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
$url=urlencode($pageURL);
$result=urldecode($url);
return $result;
}Code: Select all
passurl=getCurrentPageUrl();
header("Location:$passurl");http://www.abc.com/postcomment.php?nID= ... ???????%20?????? ??????&artist_name=????????????%20??????
and i get the correct url in firefox & google chrome as mentioned below:
http://www.abc.com/postcomment.php ... song_name=ويتميز ايو&artist_name=مزيج المسا