Php class method not being called
<p>I have a problem with my PHP class, when the user wants to follow another user the follow method is called and when the user wants to stop following the <code>delete_follow</code> is called:</p>

<pre><code>class Follow {

    protected static $table_name = "interests";


    public function follow() {
        global $dbh;
        $sql = "INSERT INTO ".self::$table_name." (company_id,user_id,likedate) VALUES (:company_id,:user_id,NOW())";
        $follow = $dbh-&gt;prepare($sql);
        $follow-&gt;bindParam(':user_id',$_SESSION['user_id']);
        $follow-&gt;bindParam(':company_id',$_GET['company']);
        if($follow-&gt;execute() == true){
            header("Location: profile.php?company=".$_GET['company']."");
            exit;
        } else {
            header("Location: error.php");
            exit;
        }
    }

    public function delete_follow() {
        global $dbh;
        $sql = "DELETE FROM ".self::$table_name." WHERE company_id = :company_id AND user_id = :user_id LIMIT 1";
        $delete_follow = $dbh-&gt;prepare($sql);
        $delete_follow-&gt;bindParam(':user_id',$_SESSION['user_id']);
        $delete_follow-&gt;bindParam(':company_id',$_GET['company']);
        if($delete_follow-&gt;execute() == true) {
            header("Location: profile.php?company=".$_GET['company']."");
            exit;
        } else {
            header("Location: error.php");
            exit;
        }
    }   


}
</code></pre>

<p>My problem is that when the delete_follow method is called it actually calls the follow method I have no idea what is going on.</p>

<p>Here is the code for the follow buttons:</p>

<pre><code>if(isset($_POST['follow'])) {
    $follows = new Follow();
    $follows-&gt;follow();
}

if(isset($_POST['delete_follow'])) {
    $follows = new Follow();
    $follows-&gt;delete_follow();
}
</code></pre>

<p>Help please.</p>
