为什么这个SQL处理两次?

Basically, for some reason my SQL for an INSERT query is processing twice and I'm not sure why.

Here's my form :

<form class="form-horizontal" method="POST" action="">
    <input id="email" name="email" class="text-style" type="email">
    <input id="password" name="password" class="text-style" type="password">
    <input id="secret" name="secret" class="text-style" type="text">
    <select class="text-style" id="console" name="console">
        <option value="XBOX">Xbox 360</option>
        <option value="PS3">PS3</option>
    </select>
    <select class="text-style" id="status" name="status">
        <option value="0">Disabled</option>
        <option value="1">Enabled</option>
    </select>
    <button class="btn btn-success pull-right" name="add_account">Add Account</button>
</form>

Here's my PHP to process the form :

if(isset($_POST['add_account'])) {
    $data = array(
        'email' => base64_encode($_POST['email']),
        'password' => base64_encode($_POST['password']),
        'secret' => base64_encode($_POST['secret']),
        'console' => $_POST['console'],
        'status' => $_POST['status'],
        'date_added' => date("y-m-d h:i:s"),
        'last_check' => date("y-m-d h:i:s")
    );
    $result = $DB->insert('accounts',$data);
    if($result) {
        if(!in_array("Account added successfully.", $msgs))
            array_push($msgs,"Account added successfully.");
    } else {
        array_push($msgs,"^Failed to add account.");
    }
}

And then here's the $DB->insert function

public function insert($table=null,$array_of_values=array()) {
    if ($table===null || empty($array_of_values) || !is_array($array_of_values)) return false;
    $fields=array(); $values=array();
    foreach ($array_of_values as $id => $value) {
        $fields[]=$id;
        if (is_array($value) && !empty($value[0])) $values[]=$value[0];
        else $values[]="'".mysql_real_escape_string($value,$this->connection)."'";
    }
    $s = "INSERT INTO $table (".implode(',',$fields).') VALUES ('.implode(',',$values).')';
    if ($this->runSQL($s)) return true;
    return false;
}

And here's the runSQL function :

public function runSQL($sqlQuery,$possibleError = 0) {
    if($sqlQuery=="") {return false;}
    mysql_query($sqlQuery);
    if(mysql_error()){  
        return false;
    }
    return true;
}

Your code looks good, and there doesn't seem to be a chance for the insert to happen twice. Can you install Firebug for Firefox, and right-click the form -> " Inspect element ". Go to "Net" and see what the form posts, and also if it posts only once? Maybe there is some Javascript attempting to submit the form again?

If everything looks good, your DB Insert function should be looked at: