try this code
<?php
error_reporting(E_ALL);
if(!mysql_connect("localhost", "root", "private")):
echo mysql_error();
exit;
else:
mysql_select_db("civilian") or die (mysql_error());
# Check all post data
print_r($_POST); exit; # debugging purpose: remove after checking
if (isset($_POST['RegistrationSubmission'])):
$TermsOfService = $_POST['TermsOfService'];
$Username = mysql_real_escape_string($_POST['Username']);
$Password = mysql_real_escape_string($_POST['Password']);
$Password2 = mysql_real_escape_string($_POST['Password2']);
$Email = mysql_real_escape_string($_POST['EmailRegistration']);
$Country = mysql_real_escape_string($_POST['CountryChoice']);
$ip = $_SERVER["REMOTE_ADDR"];
$Gender = $_POST['Gender'];
$jump2 = 1;
if($_POST['TermsOfService'] == 'off'):
echo "You must agree to the terms of service before registering!";
$jump2 = 0;
elseif($Password != $Password2):
echo "Passwords did not match";
$jump2 = 0;
elseif($jump2 == 1):
$chkUSERNAME = mysql_query("SELECT * FROM `userregistration` WHERE `Username` = '".$_POST['Username']."'");
if(mysql_num_rows($chkUSERNAME) != 0):
die('Username already registered, please choose a different username!');
endif;
$chkEmail = mysql_query("SELECT * FROM `userregistration` WHERE `Email` = '".$_POST['EmailRegistration']."'");
if(mysql_num_rows($chkEmail) != 0):
die('Email already registered, please choose a different username!');
endif;
if ($Password == $Password2):
$query = "INSERT INTO `userregistration` (Username,Password,Email,Country,IP,Gender)
Values ('$Username', '$Password', '$Email', '$Country', '$ip', '$Gender')";
mysql_query($query) or die(mysql_error());
endif;
endif;
endif;
endif;
?>