<?php
include "ChatConfig.php";
  // sql to delete a record
  $sql = "DELETE FROM group_$_POST[group] WHERE id=$_POST[id]";

  // use exec() because no results are returned
  $connection->exec($sql);
  $query = $connection->prepare("INSERT INTO remove(message,number) VALUES (:message,:number)");
                        $query->bindParam("message", $_POST["id"], PDO::PARAM_STR);
            $query->bindParam("number", $_POST["group"], PDO::PARAM_STR);
            $query->execute();