Skip to content

Simple and secure contact form using Ajax, validations inputs, SMTP protocol and Google reCAPTCHA v3 in PHP.

Notifications You must be signed in to change notification settings

dwgibbons/Contact-Form-PHP

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contact-Form-PHP

Simple and secure bootstrap contact form using Ajax, validations inputs, SMTP protocol and Google reCAPTCHA v3 in PHP.

raspgot

Live Demo

You can try this here: https://dev.raspgot.fr/github/contact-form-php

Features

  • Boostrap 4
  • Ajax submission
  • Google reCAPTCHA v3
  • PHPMailer SMTP Authentication
  • Validation and inputs security (PHP and JS)

Installation

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

Configuration

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>

Author

logo

You can visit my Portfolio and star this repo if you like it 🤖

Dependencies

About

Simple and secure contact form using Ajax, validations inputs, SMTP protocol and Google reCAPTCHA v3 in PHP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 48.6%
  • HTML 28.5%
  • JavaScript 22.9%