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
(-:;