How to refresh form after submit in PHP

How to refresh form after submit in PHP


  <title>Codelizar Form</title>
    <link rel="stylesheet" type="text/css" href="">
    <script type="text/javascript" src=""></script>
    <form method="POST" action="">
      <div class="row">
          <div class="col-md-3 form-group">
            <label for="username"></label>
            <input type="text" value="" name="username" class="form-control">
          <div class="col-md-3 form-group">
            <label for="password"></label>
            <input type="text" value="" name="password" class="form-control">
          <div class="col-md-3 form-group">
            <button name="btn_submit" type="submit" class="btn btn-info">Submit Me</button>

   $username = $_REQUEST['username'];
   $password = $_REQUEST['password'];

   // Here run you sql insert query and apply code for form refresh after successfully insertion 
   echo "<meta http-equiv='refresh' content='0'>"; // form refresh code



Leave a Reply

Your email address will not be published.