How do I change and save in the database, as soon as I update the saved value in the box, the way I am saving in the database, but when updating the page it leaves the box always filled with the first value.
$ifs = "SELECT * FROM config WHERE id='1'";
$sqs = mysqli_query($conn, $ifs);
$sda = mysqli_fetch_assoc($sqs);
if (isset($_POST['aspect'])){
$atext = mysqli_real_escape_string($conn,$_POST['aspect']);
$sql = "UPDATE 'config' SET 'aspect' = '$atext' WHERE 'id' = 1";
$ssl = mysqli_query($conn, $sql);
header("Location: settings-jw.php");
exit();
}
<form action="" method="post" >
<div class="col-sm-12 col-lg-4">
<div class="form-group">
<label for="aspect">Aspect Ratio:</label> <i class="fa fa-info-circle" data-toggle="tooltip" title="Aspect ratio"></i>
<select id="aspect" name="aspect" class="form-control">
<option value="16:9">16:9</option>
<option value="4:3">4:3</option>
</select>
</div>
</div>
<input type="submit" class="btn btn-danger" value="Salvar" />
</form>