title: Provide default values for html form, with option to change values before $_POST
body: <p>I am currently creating an html form on a web page, and i was wondering if there was a way to add default values to the text boxes, but the user could also just delete the default text and enter in new text if he needed to??? </p>
  
  <p>What i currently have is this...</p>
  
  <pre><code>&lt;html&gt;
    &lt;body&gt;
      &lt;form method="post"&gt;
        Suspend: &lt;input type="text" name="sus"&gt;&lt;br /&gt;
        Device Name: &lt;input type="text" name="dev"&gt;&lt;br /&gt;
        IP: &lt;input type="text" name="ip"&gt;&lt;br /&gt;
        Dependency: &lt;input type="text" value="none" name="depend"&gt;&lt;br /&gt;
        Email: &lt;input type="email" value="abc@123.com" name="email"&gt;
        &lt;input type="submit" value="submit" name="submit"&gt;
      &lt;/form&gt;
      &lt;/body&gt;
      &lt;/html&gt;
   &lt;?php
    if(isset($_POST['sumbit']))
   {
     $sus=$_POST['sus'];
     $dev=$_POST['dev'];
     $ip=$_POST['ip'];
     $depend=$_POST['depend'];
     $email=$_POST['email'];
  
      if(isset($sus) &amp;&amp; isset($dev) &amp;&amp; isset($ip) &amp;&amp; isset($depend) &amp;&amp; isset($email)
       {
         $update=mysqli_query($con, "UPDATE table SET Suspend=$sus, Device=$dev, IP=$ip,   Dependence=$depend, Email=$email WHERE id=$id");
        }
   }
  </code></pre>
  
  <p>With the email and dependency fields, they will be the default values 95% of the time, but not all the time, and my boss wants default values supplied for them, but also wants them to be able to change them... I then perform mysql queries with these $_POST results to update the database... right now, even if you change the text in the field in the form, it still enters in the default values in the database.. i need it to where if they do not change the default value, then the default value will be added to the database... any help would be greatly appreciated</p>