diff --git a/static/rsvp-submit.php b/static/rsvp-submit.php index cefe9f7..78de42c 100755 --- a/static/rsvp-submit.php +++ b/static/rsvp-submit.php @@ -1,4 +1,19 @@ safeLoad(); + +file_put_contents('/tmp/rsvp-debug.log', "3\n", FILE_APPEND); + require __DIR__ . '/vendor/autoload.php'; use PHPMailer\PHPMailer\PHPMailer; @@ -97,6 +112,7 @@ foreach ($fields as &$field) { $field = mb_convert_encoding($field, 'UTF-8', 'auto'); } +file_put_contents('/tmp/rsvp-debug.log', "4\n", FILE_APPEND); $mail = new PHPMailer(true); try { @@ -193,13 +209,12 @@ EOD; $mail->Body = $body; - file_put_contents( - __DIR__ . '/debug.txt', - print_r($_POST, true) -); + file_put_contents('/tmp/rsvp-debug.log', "5\n", FILE_APPEND); + $mail->send(); + file_put_contents('/tmp/rsvp-debug.log', "6\n", FILE_APPEND); -echo "PHP WORKS"; -exit; + header('Location: /thank-you/'); + exit; } catch (Exception $e) {