I'm doing a simple form where there are two text boxes and when I input the values and click the button, the entered values would be set/updated to the variables in the php code. It updates the values but for that session only and if I refresh the page, I need to input the values again.
When I click submit, it would not show any error and is internally updated but the old/default values of the variables is still there.`
<div class="modal-body">
<form action="/editUser.php" method="POST">
<table>
<tr>
<td>E-mail:</td>
<td><input type="text" name="emailChange" autocomplete="off" required></td>
</tr>
<tr>
<td>Hash Key:</td>
<td><input type="text" name="hashChange" autocomplete="off" required></td>
</tr>
</table>
<input type="submit" name="submitEdit" class="btn btn-success btn-sm acceptbtn" value="Change Value">
</form>
</div>
<?php
//edit username and hash
$username = "aaronferrerquitoriano@gmail.com";
$hash = "4a95acef14a537bb3d32bc6aad8cb80baa9d18f9ac06b3158f50784e6735c4c6";
if(isset($_POST['submitEdit'])){
$username = $_POST['emailChange'];
$hash = $_POST['hashChange'];
}
?>
</div>