This is my edit page. I can see values in my input boxes retrieved from database. What I want to do is update those values when I click on button. Here is my code plz help
<?php
require_once ('conn.php');
$id = $_REQUEST['main_id'];
$sql = "select * from users, work,home where users.id=$id and users.home_id = home.home_id and users.work_id = ie_work.work_id";
$rs = mysqli_query($conn,$sql);
$row = mysqli_fetch_assoc($rs);
$name = $row['name'];
$surname = $row['surname'];
$home = $row['home_adress'];
$work = $row['work_adress'];
$email = $row['email'];
$tel= $row['telephone'];
$job = $row['job_descrip'];
$dtime = $row['time_emp'];
?>
<form name="form12" id="form12" method="post">
<label>name:</label><input name="name" id="name" value="<?php echo $name; ?>"/><br>
<label>surname:</label><input name="surname" id="surname" value="<?php echo $surname; ?>"/><br>
<label>home-ad:</label><input name="home" id="home" value="<?php echo $home; ?>"/><br>
<label>work-ad:</label><input name="work" id="work" value="<?php echo $work; ?>"/><br>
<label>email:</label><input name="email" id="email" value="<?php echo $email; ?>"/><br>
<label>tel:</label><input name="tel" id="tel" value="<?php echo $tel; ?>"/><br>
<label>job_d:</label><input name="job" id="job" value="<?php echo $job; ?>"/><br>
<label>time_d:</label><input name="time" id="time" value="<?php echo $time; ?>"/>
<input type ="submit" value="edit" >
</form>