0
I’m having trouble sending the value of a variable that is in PHP to an external HTML page.
I have the page executes.php and I have the page call html..
call html. sends to executes.php, that sends to follows html. the information below follows my code:
First page call.html
<form method=post name="formulario" action="executa.php">
<!-- Telefone -->
<input type="text" name="numerotelefone">
<p class="tamanho">*Preenchimento Obrigatório</p><BR>
<input type="submit" value="Pesquisar" align="right" width="48" height="48">
</form>
Second page runs.php
<?php
#Campo de Busca Telefone
$telefone = $_POST['numerotelefone'];
echo "Telefone Informado: <pre>$telefone</pre>";
header('refresh:3;url=ativar.html?&numerotelefone='.$telefone);
?>
Third page follows.html
<!-- Aqui recebo o telefone da página executa.php -->
<input id="field_1" type="text" name="field_1" value="<?php echo $telefone ?>" />
After the page executes.php is displayed, it calls the page follows html. at that point I cannot send the variable value $telefone
which was received in executes.php for follows html.
The page follows.html will not run PHP code in
value="<?php echo $telefone ?>"
because it’s a common . html page. You’ll have to use Javascript to get the phone number from the URL. Why not use a PHP page to follow.php instead of follow.html?– Sam
because within the following.html I use the form with radiobutton among other elements.. would have to change the whole project, in java script I am searching now that informed me, I thought it was possible to keep in html even so thanks for the tip
– Victor
Dude, changing the . html page to . php doesn’t change anything in HTML and you can still use PHP code inside it, which is even better.
– Sam
I’ll try it here and
– Victor
funcionouuu man!! VALEUUU
– Victor