I am looking for that when processing in response.php it returns the value to the previous page to locate it in the input. I think this could solve it using $ global but I do not understand its operation much and I already read that it is not advisable.
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<form action="respuesta.php" method="post">
<select class="" name="select">
<option value="1">1</option>
</select>
<input type="text" name="" value="<?php if (isset($M_codigo)){echo $M_codigo;} ?>">
<input type="submit" name"" value="enviar">
</form>
</body>
</html>
In response php convert and return the value to the input
<?php
if ($_POST["select"]=="1") {
$M_codigo="Valor_devuelto";
}
?>