remove rememberMe from script
<p>i was wondering if anyone can help me out? what im trying to do is remove the rememberMe code from this script, but im having a had time doing it. If anyone can help me do this and give me any info on if the script is secure that would be great thanks...</p>

<pre><code> include("db.php");
$user    = mysql_real_escape_string(strip_tags($_POST['user']));
$datetime    = mysql_real_escape_string(strip_tags($_POST['lastlogin']));
$pass    = mysql_real_escape_string(strip_tags($_POST['pass']));
$pass = hash('sha512', $_POST['pass']);
$rememberMe    = mysql_real_escape_string(strip_tags($_POST['rememberMe']));
if ($rememberMe == "rememberMe"){
    $rememberMe = "1";
    }else{
    $rememberMe = "0";
}
$sql = "Select * from members WHERE
user = '{$user}'";
$result = mysql_query($sql, $conn)
or die();
if ($row = mysql_fetch_array($result)){
    if ($row["actnum"] == "0"){
        if ($row["numloginfail"] &amp;lt;= 5){
            if ($row["pass"] == $pass){
                $datetime = date("d-m-Y G:i ");
                $sql = "UPDATE members Set
                lastlogin = '{$datetime}'
                WHERE user = '{$user}'";
                mysql_query($sql, $conn)
                or die();
                $sql = "UPDATE members Set
                numloginfail = '5'
                WHERE user = '{$user}'";
                mysql_query($sql, $conn)
                or die();
                session_start();
                session_unset();
                session_destroy();
                session_register('pass');
                $_SESSION['pass'] = $pass;
                session_register('id');
                $_SESSION['id'] = $user;
                if($rememberMe=="1"){
                    setcookie("rememberCookieUname",$user,(time()+604800));
                    setcookie("rememberCookiePassword",md5($pass),(time()+604800));
                }
                header("Location: members");
                exit();
            }
            else{
                $datetime = date("d")*10000000000 + date("m")*100000000 + date("Y")*10000 + date("G")*100 + date("i");
                if ($row["lastloginfail"] &amp;gt;= ($datetime-5)){
                    $sql = "UPDATE members Set
                    numloginfail = numloginfail + 1
                    WHERE user = '{$user}'";
                    mysql_query($sql, $conn)
                    or die();
                    $sql = "UPDATE members Set
                    lastloginfail = '{$datetime}'
                    WHERE user = '{$user}'";
                    mysql_query($sql, $conn)
                    or die();
                }
                else{
                    $sql = "UPDATE members Set
                    lastloginfail = '{$datetime}'
                    WHERE user = '{$user}'";
                    mysql_query($sql, $conn)
                    or die();
                }
            makeform($incorrectLogin);}
        }
        else {
            $datetime = date("d")*10000000000 + date("m")*100000000 + date("Y")*10000 + date("G")*100 + date("i");
            if ($row["lastloginfail"] &amp;lt;= ($datetime-30)){
                $sql = "UPDATE members Set
                numloginfail = '0'
                WHERE user = '{$user}'";
                mysql_query($sql, $conn)
                or die();
                makeform($underAttackReLogin, "$user");
            }
            else{
                makeform($underAttackPleaseWait);
            }
        }
    }
    else{
        makeform($accountNotActivated);
    }
}
else{
    if ($user == ""){
        makeform("");
    }
    else {
        makeform($incorrectLogin);
    }
}
function makeform($errormessage="", $user = ""){
</code></pre>
