title: How to keep the form data persistent and display for a user all the time
body: <p>How can I make the user submit the form, store it in MYSQL DB and then display the same submitted data in the form field?</p>
  
  <pre><code>    &lt;div class="form-group"&gt;
        &lt;label class="control-label col-sm-2" for="lname"&gt;Last Name*&lt;/label&gt;
        &lt;div class="col-sm-10"&gt;
          &lt;input type="text" class="form-control" id="lastname" placeholder="Last Name" name="lastname" value="" autocomplete="nope" required&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="form-group"&gt;
        &lt;label class="control-label col-sm-2" for="email"&gt;Email*&lt;/label&gt;
        &lt;div class="col-sm-10"&gt;
          &lt;input class="form-control" type="email" id="email" placeholder="Enter email" name="email" value=""  autocomplete="nope"required /&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="form-group"&gt;
        &lt;label class="control-label col-sm-2" for="phone"&gt;Phone&lt;/label&gt;
        &lt;div class="col-sm-10"&gt;
          &lt;input type="text" class="form-control" id="phone" placeholder="Phone" name="phone" value="" autocomplete="nope" /&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Below script is used to save into MSQL database</p>
  
  <pre><code>function post() {
    var firstname = document.getElementById("firstname").value;
    var lastname = document.getElementById("lastname").value;
    var email = document.getElementById("email").value;
    var phone = document.getElementById("phone").value;
  
    if(firstname &amp;&amp; lastname &amp;&amp; email &amp;&amp; phone) {
      $.ajax({
        type: 'post',
        url: 'profile.php',
        data: {
          firstname: firstname,
          lastname: lastname,
          email: email,
          phone: phone
        },
        success: function (response) {
          document.getElementById("status").innerHTML="Profile updated successfully";
        }
      });
    }
  
    return false;
  }
  </code></pre>
  
  <p>Any similar example link would be great!</p>
  
  <p>Now my question/problem/process is:</p>
  
  <ol>
  <li>To save the form data into MYSQL DB (this I have already done).</li>
  <li>How do I still display the form data of that specific user in the input field each time the user login? (To be done)</li>
  </ol>
  
  <p>Kindly help me as I am trying since last 3 days for a solution and have used so many approaches available on the internet and nothing has worked so far. Your help is very much appreciated. Thank you.</p>