Redirect to URL with input value filled out

0

I would like to know if it is possible to mount a redirection to a third-party login screen with the input value filled in?

would point something like: http://dominio.com.br/login?pt01=admin-51

the input looks like this:

<input id="P101-USERNAME" name="pt01" value="" placeholder="Usuário" type="text">

Is it possible to build a url that fills the value field?

    
asked by anonymous 17.01.2018 / 15:17

1 answer

0

If I understand what you want, get the value passed in the url GET after a simple check adds the value value of the input :

$p_t01 = filter_input(INPUT_GET, 'pt01'); //pegando o valor
$input = '';
if(!empty($p_t01)){
    echo "<input input id='P101-USERNAME' name='pt01' value='$p_t01' placeholder='Usuário' type='text' />";//adicionando o valor ao input
}
echo $input;
    
17.01.2018 / 15:27