1
1
mirror of https://github.com/neosubhamoy/neosubhamoy-portfolio.git synced 2025-12-20 01:09:35 +05:30

(feat): added phpdotenv and phpmailer library

This commit is contained in:
2023-12-10 21:15:06 +05:30
parent f7ecbcf334
commit cec8a42a52
369 changed files with 40737 additions and 3 deletions

View File

@@ -1,7 +1,11 @@
<?php
require 'vendor/autoload.php';
require '../../connection.php';
require 'query_functions.php';
$dotenv = Dotenv\Dotenv::createImmutable('../../');
$dotenv->load();
function form_input_filter($conn, $data){
$data = trim($data);
$data = stripslashes($data);
@@ -22,12 +26,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if($name !== "" && $email !== "" && $message !== "") {
if($recaptcha !== "") {
$secret = '';
$secret = $_ENV['RECAPTCHA_SECRET'];
$verifyResponse = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . $secret . '&response=' . $recaptcha);
$responseData = json_decode($verifyResponse);
if($responseData->success) {
}
else {