Código:
public function add_muro(){ db::set_names(); $date = date("Y-m-d"); //definimos las variables $m_user_escritor = $_SESSION['user_zero']; $m_user_receptor = strip_tags($_POST['m_user_receptor']); $m_texto = strip_tags($_POST['m_texto']); //hacemos el insert $sql="INSERT INTO `m_muro` (`m_user_escritor`, `m_user_receptor`, `m_texto`, `m_date`) VALUES (?, ?, ?, '$date')"; $stmt=db::getInstance()->prepare($sql); //insertamos las variables $stmt->bindParam(1, $m_user_escritor); $stmt->bindParam(2, $m_user_receptor); $stmt->bindParam(3, $m_texto); $stmt->execute();