I dont know what to do with this. I want to update a record from database. I have header were there, the fullname of the user is displayed once login, and has also a dropdown. One of this dropdown is Account Setting were a user can update his Information. But I dont know what to do since Its my first time working with php. below is my code in displaying the record.
<?php
$session_useraccount_id=$_SESSION['useraccount_id'];
$qry= "SELECT * FROM tblusersaccount where useraccount_id = '$session_useraccount_id'";
$result=mysql_query($qry) or die(mysql_error());
{
$useraccount_id=mysql_result($result,$i,'useraccount_id');
$fname=mysql_result($result,$i,'fname');
$lname=mysql_result($result,$i,'lname');
$email=mysql_result($result,$i,'email');
$password=mysql_result($result,$i,'password');
$useraccountname=mysql_result($result,$i,'useraccountname');
?>
<?php echo "<a style='color: white' href='updateusers.php?update = $useraccount_id'>$fname $lname   ";?>
It gives me the id, and I can display it to other page.
$qry= "SELECT useraccount_id, fname, lname, useraccountname, email, password FROM tblusersaccount";
$result=mysql_query($qry) or die(mysql_error());
{
$useraccount_id=mysql_result($result,$i,'useraccount_id');
$fname=mysql_result($result,$i,'fname');
$lname=mysql_result($result,$i,'lname');
$useraccountname=mysql_result($result,$i,'useraccountname');
$password=mysql_result($result,$i,'password');
}
and below I put this
First Name
" required>
and so on.
How can I update my record??