You can use the jquery to do this, I did it running but I believe it will work:
You put this script in your index.php or create a file .js (don’t forget to remove the tag <script> and </script> for this) and reference in your index which also works.
<script>
$(document).ready(function () {
$("#botao").click(function () {
var pegalink = document.getElementById('link').value;
window.open("teste2.php/" + pegalink);
});
});
</script>
And add that to your index.php:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input type="text" name="link" id="link">
<input type="button" id="botao" name="botao">
And then just change the link to window.open for the page you want to assign the values in the URL(enviado.php, for example) and my values that are in the fields of script and inputs by yours that works normal.
Why the PHP tag? What should be done in PHP?
– user60252
If any answer solved your problem mark it as accepted. See how in https://i.stack.Imgur.com/evLUR.png and see why in https://pt.meta.stackoverflow.com/questions/1078/como-e-por-que-aceitar-uma-resposta/1079#1079
– user60252
Another post that may help you get better answers in your next questions is https://answall.com/help/mcve
– user60252