k, i have a small javascript function that redirects to another page, passing some variables along with it.
one of the form values has several spaces in it, that are not automatically converted to %20 's in the location.href. I'm not super java fluent (php is betta), is there a function, like urlencode() or something that I can run??
my code is here... the 'newvalue' variable is sending spaces, causing the rest to be neglected
/*
function dostuff(newvalue, id, region, field)
{
var thingy;
thingy = '?value=' + newvalue + '&id=' + id + '®ion=' + region + '&name=' + field;
top.location.href = 'dealerssql.php' + thingy;
}
*/