Simple and secure bootstrap contact form using Ajax, validations inputs, SMTP protocol and Google reCAPTCHA v3 in PHP.
You can try this here: https://dev.raspgot.fr/github/contact-form-php
- Boostrap 4
- Ajax submission
- Google reCAPTCHA v3
- PHPMailer SMTP Authentication
- Validation and inputs security (PHP and JS)
Use clone command or direct download
git clone https://github.com/raspgot/Contact-Form-PHP.git
cd Contact-Form-PHP
php -S localhost:8000
Or use XAMMP
SMTP sender → HERE
GOOGLE keys → HERE
More configurations examples → HERE
AjaxForm.php
Timezones doc → HERE
date_default_timezone_set(''); # your country
const HOST = ''; # SMTP server
const USERNAME = ''; # SMTP username
const PASSWORD = ''; # SMTP password
const SECRET_KEY = ''; # GOOGLE secret key
AjaxForm.js
const publicKey = ''; // GOOGLE public key
index.html
<script src="https://www.google.com/recaptcha/api.js?render=GOOGLE_PUBLIC_KEY"></script>
You can visit my Portfolio and star this repo if you like it 🤖