I want to get the value I'm going to write in my textbox
. Everything on the same page to then change a table field by the value entered in textbox
.
<form method="POST" action="#">
<input type=text required name='txtnewpass' autofocus style='width:150px' value='<?php echo "$txtnewpass"; ?>'>
<input type=submit name=Alterar value=Alterar>
</form>
PHP
if ($_POST['txtnewpass']){
$txtnewpass = $_POST['txtnewpass'];
}
$base_hndl = new SQLite3($dir.$base);
$requete = "UPDATE 'users' SET
password='$txtnewpass'
WHERE login='$login'";
$resultat = $base_hndl->exec($requete);
echo "<br><b><center>password change</center></b>";