hi i am trying to update information in a database from a form and i'm not sure how to do it this is the code i got so far it brings up the information from the database but it won't update when i change something. Can anyone help me.

PHP Code:
<?php
include("dbinfo.php");

$conn mysql_connect($dbhost$dbuser$dbpass)or die('Error connecting to mysql');

$dbname 'db_02023334';
mysql_select_db($dbname)or die('error finding DB');

$univerpass $_POST['univerpass'];
$date $_POST['date'];
$query"SELECT * FROM info WHERE uni_pass = '$univerpass' and dob = '$date'";

    
$result mysql_query($query);
        
    while(
$row mysql_fetch_array($result))
    {

$title=$row['title'];
$fname=$row['first_name'];
$sname=$row['second_name'];
$dob=$row['dob'];
$gender=$row['gender'];
$homead=$row['home_ad'];
$city=$row['city'];
$country=$row['home_country'];
$homepost=$row['home_post'];
$homephone=$row['home_phone'];
$termad=$row['term_ad'];
$termpost=$row['term_post'];
$termphone=$row['term_phone'];
$email=$row['email'];
$ethnic=$row['ethnic'];
$ethnicother=$row['ethnicother'];
$disability=$row['disability'];
$qual=$row['qual'];
$type=$row['course'];
$years=$row['years_study'];
$unipass=$row['uni_pass'];
}
?>
<form action="amend2.php" method="post">
Title: <input type="text" value="<?php echo "$title"?>" name="title"><br>
First Name: <input type="text" value="<?php echo "$fname";?>" name="fname"><br>
Second Name: <input type="text" value="<?php echo "$sname";?>" name="sname"><br>
Date of Birth: <input type="text" value="<?php echo "$dob";?>" name="dob"><br>
Gender:          <input type="text" value="<?php echo "$gender";?>" name="gender"><br>
Home Address:          <input type="text" value="<?php echo "$homead";?>" name="homead"><br>
City:          <input type="text" value="<?php echo "$city";?>" name="city"><br>
Country:          <input type="text" value="<?php echo "$country";?>" name="country"><br>
Home Postcode:          <input type="text" value="<?php echo "$homepost";?>" name="homepost"><br>
Home Telephone:          <input type="text" value="<?php echo "$homephone";?>" name="Title"><br>
Term Address:          <input type="text" value="<?php echo "$termad";?>" name="termad"><br>
Term Postcode:          <input type="text" value="<?php echo "$termpost";?>" name="termpost"><br>
Term Telephone:          <input type="text" value="<?php echo "$termphone";?>" name="termphone"><br>
E-mail:          <input type="text" value="<?php echo "$email";?>" name="email"><br>
Ethnic Origin:          <input type="text" value="<?php echo "$ethnic";?>" name="ethnic"><br>
Ethnic Other:          <input type="text" value="<?php echo "$ethnicother";?>" name="ethnicother"><br>
Disability:          <input type="text" value="<?php echo "$disability";?>" name="disability"><br>
Qualification:          <input type="text" value="<?php echo "$qual";?>" name="qual"><br>
Type of Course:          <input type="text" value="<?php echo "$type";?>" name="type"><br>
Years of Study:          <input type="text" value="<?php echo "$years";?>" name="years"><br>
<input type="submit" value="Submit">
</form>