title: How to execute a funtion after a time delay in php?
body: <p>I have created a button called "Generate" , when click event is performed it should start a timer after reaching 60 sec it should perform an if statement. I tried the following code but its not working.</p>
  
  <pre><code>if(isset($_POST['generate']))
        {
         $timer = time();
          if($timer = $timer+5)
         {
           $query = mysql_query("UPDATE user_login SET password='' WHERE username = 'ajai sandy'") ;
                       $qry_run = mysql_query($query);
         }
  </code></pre>
  
  <p>In the above code I have used the system time , I could use both the system time or a timer to complete this action. </p>