<?php $a = htmlspecialchars(strip_tags($_GET['Affcode'])); if($a) { $link = "http://www.xxy.com/?Affcode=$a"; header("Location: $link"); } ?>