Finding time remaining
<p>What would be the correct equation for finding out the variable timeRemaining in minutes.</p>

<pre><code>$lockDate = $row['lockDate'];

                $currentDateTime = time();

                // Find out if user is locked out of their account
                if (($lockDate != "0000-00-00 00:00:00") &amp;&amp; strtotime($lockDate) &lt; $currentDateTime) { 

                    $lockDate = strtotime($lockDate);
                    $diff = $currentDateTime - $lockDate;
                    echo $diff;

                    // Take minutes and perform tasks
                    if ($diff &lt;= 600) {

                        // Calculate time remaining
                        $timeRemaining = 10 - $diff;

                        // Account locked error
                        $errors = true;
                        $message = "Your account is currently locked, we appologize for the inconvienence. You must wait " .$timeRemaining." minutes before you can log in again!";

                        $output = array('errorsExist' =&gt; $errors, 'message' =&gt; $message);

                    } else {

                        // Clear the lock
                      //  $query = "UPDATE manager_users_hacking SET lockDate = NULL, hackerIPAddress = NULL, failedLogins = 0 WHERE userID = '".$userID."'";
                        $result = mysqli_query($dbc,$query);

                    } 

                }
</code></pre>
