 <p>Why do want to have the value empty. You can describe during form. Such as:</p> <pre><code>&lt;input type="text" name="firstname" values=&lt;?php echo $firstname;?&gt; </code></pre> <p>and on submit check as </p> <pre><code>$query = "Update table SET " if(isset($_POST['firstname']) &amp;&amp; strlen($_POST['firstname'])&gt;0){ $query.= "firstname = ".$_POST['variable']; } </code></pre>