How to remove button after submit form using PHP
<p>I need one help.I need to totally remove the submit button after submit the form and when it will be submitted the button will display to user.I am explaining my code below.</p>

<pre><code>&lt;form name="billdata" id="billdata"  enctype="multipart/form-data" method="POST" onSubmit="javascript:return checkForm();" action="complain.php"&gt;
  &lt;div class="input-group bmargindiv1 col-md-12"&gt;
      &lt;span class="input-group-addon ndrftextwidth text-right" style="width:180px"&gt; Name :&lt;/span&gt;
       &lt;input type="text" name="u_name" id="name" class="form-control" placeholder="Add Name" onKeyPress="clearField('name');"&gt;
        &lt;/div&gt; 
&lt;input type="submit" class="btn btn-success" name="complainSubmit"  id="addProfileData" value="Submit"/&gt;
&lt;/form&gt;
</code></pre>

<blockquote>
  <p>complain.php:</p>
</blockquote>

<pre><code>require_once("./include/dbconfig.php");
if(isset($_REQUEST['complainSubmit']))
{
 // ......data is collecting here....
}
</code></pre>

<p>when data are submitted successfully the below part is executing.</p>

<pre><code>&lt;script type="text/javascript"&gt; 
   var phpVar = "&lt;?php echo $_GET['success'];?&gt;";
    //console.log('php',phpVar=='');
    if(phpVar == 1 &amp;&amp; phpVar!=''){
        alert('Submitted successfully.');
        //var subButton=document.getElementById('addProfileData');
        //subButton.disabled=false;
    }
    else if(phpVar == 0 &amp;&amp; phpVar!=''){
        alert('Unable to add.\\nTry again.');   
    }
    else{
        // nothing
    }
&lt;/script&gt;


&lt;script&gt;
 function checkForm(){
    var s=document.billdata;
    if(s.u_name.value==''){
        alert('Please enter name');
        s.u_name.focus();
        s.u_name.style.borderColor = "red";
        return false;
    }
}
&lt;/script&gt;
</code></pre>

<p>Here i need to button hide when the data is going to submit and it will again display after the submit.Please help me.</p>