2021-04-26 10:28:44 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$email = $_GET["email"];
|
|
|
|
$lang = "da";
|
|
|
|
|
2021-04-27 07:12:31 +00:00
|
|
|
$to = "rasmusulovliglogning.dk";
|
2021-04-26 10:28:44 +00:00
|
|
|
$subject = "signup";
|
|
|
|
$body = "email: ".$email."\nlang: ".$lang;
|
2021-04-26 14:52:39 +00:00
|
|
|
// Report all PHP errors
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
|
2021-04-27 07:12:31 +00:00
|
|
|
$fi = file_get_contents("signup.csv");
|
|
|
|
$fi.= $email;
|
|
|
|
file_put_contents("signup.csv",$fi);
|
2021-04-26 15:00:18 +00:00
|
|
|
|
2021-04-27 07:12:31 +00:00
|
|
|
//$a = mail($to, $subject, $body);
|
|
|
|
//print_r($email);
|
|
|
|
//print_r($a);
|
|
|
|
//
|
2021-04-26 15:00:18 +00:00
|
|
|
// if (mail($to, $subject, $body)) {
|
|
|
|
// if ($lang == "da") {
|
|
|
|
// $redirect = "https://ulovliglogning.dk/redirect/success/";
|
|
|
|
// } else {
|
|
|
|
// $redirect = "https://ulovliglogning.dk/".$lang."/redirect/success/";
|
|
|
|
// }
|
|
|
|
// } else {
|
|
|
|
// if ($lang == "da") {
|
|
|
|
// $redirect = "https://ulovliglogning.dk/redirect/fail/";
|
|
|
|
// } else {
|
|
|
|
// $redirect = "https://ulovliglogning.dk/".$lang."/redirect/fail/";
|
|
|
|
// }
|
|
|
|
// }
|
2021-04-26 10:28:44 +00:00
|
|
|
|
|
|
|
# header('Location: '.$redirect);
|
|
|
|
# die();
|
|
|
|
?>
|