if (isset($_POST['url'])) { $url = $_POST['url']; header( 'Location: ' . $url) } else [insert HTML here]