<?php
if(isset($_POST['add'])){
$con=mysqli_connect("localhost", "root", "", "vpmsdb");
if(mysqli_connect_errno()){
echo "Connection Fail".mysqli_connect_error();
}


 $password =md5($_POST['password']);
 
    $query=mysqli_query($con, "UPDATE tbladmin set password = '$password'  where ID = 1");
    if ($query) {
    
    echo '<script>alert("You have successfully registered")</script>';
  }
}
  ?>

<div class="login-form">
                    <form method="post" ;">
                         
                    
                        <div class="form-group">
                            <label>Password</label>
                           <input type="password" name="password" placeholder="Enter password" required="true" class="form-control">
                        </div>
               
                     
                        <button type="submit" name="add" >CHANGE</button>
                       
                       
                    </form>