Skip to content
On this page

Add a new Member to a project

A leader can remove a member from a project.

A POST request to our Database deletes the entry from the works table.

php
if(isset($_POST["submit_remove_member_form"]))
    {
        $stmt="delete from works where u_id=:u and p_id=:p";
        $stmt=$pdo->prepare($stmt);
        $stmt->execute(array(
            "u"=>$_POST["uid"],
            "p"=>$_POST["project_id"]
        ));
        $stmt="delete from tasks where u_id=:u and p_id=:p";
        $stmt=$pdo->prepare($stmt);
        $stmt->execute(array(
            "u"=>$_POST["uid"],
            "p"=>$_POST["project_id"]
        ));