I am trying to pass two values from a page to another page using javaScript as follows:
window.location.href = "changefile.php?equation="+s+"&constant="+c;
Inside changefile.php I am getting the values as
$eqn =$_GET['equation'];
$cons=$_GET['constant'];
It is working fine for all the cases except:
Suppose the value of equation is x+1.
I am passing it using window.location.href = "changefile.php?equation="+s+"&constant="+c;
I am getting as x 1 as output. The + is missing.
Please help me. What I am doing wrong?