Some special Errors

Hello everybody (-:
I wanted to test out my php skript, but it didn’t work. I have test it bevore on an other website and it worked well. I have switched on the display errors but i did not see an error. Nothing is showed when i get on my page:

Herse th code if you want to read it(-:

<html>
<body>

<?php


	
	$mySQL = "****.epizy.com";
	$SQLuser = "epiz_*****";
	$password = "*********";
	$databaseScool = "**********";
	

//	if(!($db =   new mysqli($mySQL, $SQLuser, $password, $databaseScool))){echo "Error_DB1";die;}

$firstName = "Max";
	$lastName  = "Mustermann";
	$username  = "root";
	$date      = "2001-7-30";
	$age	   = "16";
	$email	   = "********@gmail.com";
	$send	   = "false";
	$userPassword  = "*********";
	$location  ="at";
	
	$timestamp = date('Y-m-d-H-i-s');
	$checked   = false;
	
	
	
	$key = hash('ripemd160',$username . $timestamp);


	if($firstName != null && $lastName != null && $date != null && $age != null && $email != null && $send != null)
	{
		
		
		$statment = "INSERT INTO `".$databaseScool."` . `noncertifiedusers` (`firstName`, `lastName`, `username`, `date`, `age`, `email`, `sendToUser`, `password`, `key`, `timestamp`, `checked`) VALUES 
		('" . $firstName . "', '" . $lastName . "', '" . $username . "', '" . $date . "', '" . $age . "', '" . $email . "', '" . $send . "', '" . $userPassword . "', '" . $key . "', '" . $timestamp . "', '" . 
		$checked . "', '" . $location . "');";
		
		//Statment 
		if($db->query($statment))	
		{
			sendEmail($email,$username,$key);
			echo "r";
		}
		
	


	}	else	{
		echo"f";
	}


function sendEmail(String $email,String $username,String $key)	
{
	
	$stringLink = "https:/************/getCheckedEmail.php?key=" . $key . "&user=" . $username;
	

	
	$message = "Dear " . $username . "\
\
Please confirm your email by clicking on the following link: \
" . $stringLink . 
	"\
If this message has not been addressed to you, please ignore it.\
\
Happy scooling!!";
	
	mail($email, "Scool-registration" ,$message);
}


	
	
	
?>
</body>
</html>

I will be very happy if i get an positiv messeng
(-:;

First of all, I’ve reformatted your message a bit to make it easier to read. Add three backticks above and below the code to make it a code block.

Second, you say it doesn’t work. What doesn’t work exactly if you don’t see an error? Have you enabled display_errors in your PHP settings to make sure any errors generated are shown? What makes you conclude right now that your script doesn’t work?

I have debuged this sript really long and i found the error

Everything is working and i have also enabled display_errors in php

The reasen why it doesent wor is, that row:

sendEmail($email,$username,$key);

function sendEmail(String $email,String $username,String $key)
{

$message = "Dear ***"; 
mail($email, "Scool-registration" ,$message);

}

I have testet it out on my own local apache server and it worked really well:

Maybey i have an error on my settings(-:

Butt it didnt find one:

(Sorry for my bad englisch)-: )

For starters, you need to define a From header, otherwise most email servers will just reject your message.

Please see this article for more information about sending email from your website: https://infinityfree.net/support/php-mail