This isn’t working:
<?php
header('Location: www.mysite.com/index.php?foo=bar&var=abc');
?>
I end up with http://www.mysite.com/index.php?foo=bar I think HTML might be trying to interpret the &var as a character. The initial variable is passed (after ?) but all subsequent are not (after &).
use htmlspecialchars to prevent html injection