i have a javascript variable which contains a string with new lines and spaces e.g "a \n d" i want to pass this to php without losing any spaces or new lines. currently i am using this:
my_window = window.open("", "ChemEdit Molfile", "status=1,width=550,height=350");
urlString = "/chemedit/b.php?var=" +r;
my_window.location = urlString;
where r is the string i pass.
but if i do this in php
echo $_GET["var"];
i just get it on one line with the spaces gone
please help