-1
I’m creating a testing page to see if I can use, learn and then pass this on to a larger project.
My problem is this: create the submission form in HTML, do the BD search with PHP, but I can’t return the result of the PHP search to HTML
HTML:
<html>
<head>
<meta charset="utf-8" />
<title>Teste</title>
</head>
<body>
<form action="teste.php ">
<input type="submit" name="Pesquisar"/>
</form>
</body>
</html>
PHP
<?php
$conexao = mysqli_connect('localhost','root','','login_sessao');
$consulta = mysqli_query($conexao, "SELECT usu_Senha FROM tb_usuario where usu_Email = 'emailQualquer'");
$consultaQ = mysqli_fetch_assoc($consulta);
echo "Sua senha é: " + $consulta['usu_Senha'];
?>
I’m sorry if I’m formatted wrong, first time asking a question, but thanks in advance.
got it, and now to be able to send this variable $string to html page? , I tried to put in the value of a
<tag>
the following:value = <?php echo $string; ?>
but it wasn’t– Guilherme Costa
value="<?php echo $string; ?>"
- correcting– Guilherme Costa
The second comment should work. Remember that php is usually interpreted only on pages with the .php. extension Save configuration cases for other extensions...
– LipESprY
this second comment is inside an html page, it may be that the reason is not returning any results?
– Guilherme Costa
Just change and test, Uai. It’ll be on the fly.
– LipESprY
Damn, what a silly mistake, I managed to solve now, thank you
– Guilherme Costa