Let's say I have a form like this
<?php include 'file2.php' ; ?>
<form action="file1.php" method="POST">
   <input type="hidden" name="LHS" value="column1">
   <input type="hidden" name="RHS" value="row">
   <button type="submit">Submit</button>
</form>
and I have an update query in file2.php like this
$lhs = $_POST['LHS']
$rhs = $_POST ['RHS']
$update = "UPDATE table1 SET
           column1 = '".$rhs."'
           WHERE id = '".$_SESSION['id']."'";
mysqli_query($conn, $update);
So my questions is how can I use a variable($lhs) in place of "column1" to update mysql data
I have tried $table1['column1'] method too, but it only seems to work on Rhs side but not the LHS
 
     
    