I have a function which calls a script with this information in the GET:
color = color_class(statistics[0]);
class = get_class(statistics[0]);
class = '<font style="color:'+color+';">'+class+'</font>';
switch(stage){
case 1: call_file('tut_class.php?choice='+class,'main'); break;
}
This looks like this:
<font style="color:#0d84b6;">Class One</font>
But in the Console it shows like this:
tut_class.php?choice=%3Cfont%20style=%22color: //the rest is missing
And so i cannot obtain it in the PHP script to display. Is there a way to solve this ?
You should escape the string before adding it to the URL with urlencode, and later use urldecode to unescape it.
Edit: oops, you are writing javascript. You should use javascript’s encodeURIComponent to encode the string, and not PHP’s urlencode.