jasonc Posted May 30, 2010 Share Posted May 30, 2010 I have tried variouos method from & to & and even placingf it in a string but can not seem to get the & in the URL so it validates with w3.org $ampersand = "&"; header("Location: index.php?" . $gets . $ampersand . "phpsession=" . $phpsession); what is the correct method to add a & in the URL Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted May 30, 2010 Share Posted May 30, 2010 What do you mean"so it validates with w3c"? How are you attempting to do that, and what, if any error are you getting? Quote Link to comment Share on other sites More sharing options...
teamatomic Posted May 30, 2010 Share Posted May 30, 2010 Try: header("Location: index.php?$gets&phpsession=$phpsession"); HTH Teamatomic Quote Link to comment Share on other sites More sharing options...
pornophobic Posted May 30, 2010 Share Posted May 30, 2010 PHP has a few functions built in for this. Did you try urlencode() OR, htmlentities() I'm pretty sure one of those converts & to & Also, if you're using it for a location header I don't think you need it to be encoded. :s Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.