<?php
if(isset($_POST['url'])) {
$href = htmlspecialchars($_POST['name'], ENT_QUOTES, 'UTF-8');
}
?>
<form action = "/" method = "POST">
<input type = "text" name="url" placeholder = "URL сайта">
<input type = "submit" value = "отправить">
<a href="<?php echo $href; ?>">Ссылка</a>
</form>