Getting 500 Error when redirecting to this php file.
everything pretty much ive tried.
Not sure if it has anything to do with my hosting provider, which I HIGHLY doubt. i've checked through the sql and php and everything seems to be fine, been stuck on it for a good while.
include("GlobalVariables.php");
$conn=mysqli_connect('this info is correct');
$email=$_POST["EMAIL"];
$username=$_POST["USERNAME"];
$password=$_POST["PASSWORD"];
$ip=$_SERVER['REMOTE_ADDR'];
$date = date('Y-m-d');
if (check_username_valid($conn,$username)==false){
$check1 = inject_sql($conn,"SELECT * FROM `userdata` WHERE `ip` = '$ip'");
$check2 = inject_sql($conn,"SELECT * FROM `userdata` WHERE `username`='$username'");
if (mysqli_row_count($check)==$max_accounts&&$check2["username"]==null){
inject_sql($conn,"INSERT INTO `userdata`(`ip`, `username`, `password`, `email`, `reg_date`, `verified`) VALUES ('$ip','$username','$password','$email','$date',false");
echo "0";
$check3 = inject_sql($conn,"SELECT * FROM `userdata` WHERE `reg_date` = '$date' AND `username` = '$username");
echo "1";
if ($check3["username"] == "$username"){
echo "2";
header('Location:../index.html');
}
}
else{
header('Location:../index.html');
}
}
else{
}