I am trying to create update function for logged user but I get this kind of error:
invalid query: Unknown column 'johnny' in 'where clause'
can someone help me notify the problem?
<?php
$result = mysql_query("select * from admin where username_admin =".$_SESSION['username_admin']);
if($result) { 
while($row = mysql_fetch_array($result)) {
$_SESSION["username_admin"] = $row['id_admin'];                             
    ?>
   <li>   <a tabindex="-1" href="edit-user.php?id=<?php echo $row['id_admin']; ?>">Edit Account</a>
   </li>
        <?php
        }
        }
        else {
        echo 'invalid query: '.mysql_error(). "\n";
        }
        ?>
 
    