尝试检查是否已存在具有相同值的电子邮件

Im trying to make so it checks if the email already exists in the database before inserting the data in it.

Here is my code:

<?php
    $servername = "servername";
    $username = "username";
    $password = "password";
    $dbname = "dbname";

    $Mail = $_POST['email'];

    // Create connection
    $conn = new mysqli($servername, $username, $password, $dbname);

    // Check connection
    if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
    }

    //Inputed in E-Mail Field
    $Mail = $_POST['email'];

    $SearchEmail = $conn->query("SELECT (Mail) FROM betakey WHERE Mail = '$Mail'");

    if ($SearchEmail->num_rows > 0) {
        print "That Email is already registered for the closed alpha";
    }
    else {
        $conn->query("INSERT INTO betakey VALUES ('$Mail')");
    }

    $conn->close();
    ?> 

It doesn't give me any error when i access the page but it also doesn't echo that it exists or inserts the data when it doesn't.

The problem is in your insert query. An insert query is always structured like shown below.

INSERT INTO table_name (column1, column2, column3,...) VALUES (value1, value2, value3,...) See: http://www.w3schools.com/php/php_mysql_insert.asp

Applying this to your code, results in the following.

<?php
$servername = "servername";
$username = "username";
$password = "password";
$dbname = "dbname";

$Mail = $_POST['email'];

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);

// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}

//Inputed in E-Mail Field
$Mail = $_POST['email'];

$SearchEmail = $conn->query("SELECT count(Mail) FROM betakey WHERE Mail = '$Mail'");

if ($SearchEmail->num_rows > 0) {
    print "That Email is already registered for the closed alpha";
}
else {
    $conn->query("INSERT INTO betakey (Mail) VALUES ('$Mail')");
}

$conn->close();
?> 

And I suggest you take away one of the two '$Mail = $_POST['email'];', because it is useless to declare a variable twice in the same way.