Skip to content

Simple, customizable and secure bootstrap contact form Jquery FREE using Ajax, validations inputs, SMTP protocol, rejected domain and Google reCAPTCHA v3.

Notifications You must be signed in to change notification settings

raspgot/Contact-Form-PHP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contact-Form-PHP

version code size closed issues stars

Basic, simple and secure bootstrap contact form.
Using Ajax protocol, PHP & JS validations inputs, SMTP mail sending, rejected not found domain and Google reCAPTCHA v3.
Jquery FREE.

Live Demo

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

Features

  • PHP 8.4.1 ✔️ (See supported versions)
  • Bootstrap 5
  • Ajax submission
  • Google reCAPTCHA v3
  • PHPMailer SMTP Authentication
  • Validation and inputs security (PHP & 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 Laragon / XAMMP

Configuration

SMTP sender → HERE
GOOGLE keys → HERE
More PHPMailer configurations → HERE

/AjaxForm.php
Timezones doc → HERE

date_default_timezone_set(''); # your country

const SMTP_HOST     = ''; # SMTP server
const SMTP_USERNAME = ''; # SMTP username
const SMTP_PASSWORD = ''; # SMTP password
const SECRET_KEY    = ''; # GOOGLE secret key

/AjaxForm.js

const reCAPTCHA_site_key = 'GOOGLE_PUBLIC_KEY';

/index.html

<script src="https://www.google.com/recaptcha/api.js?render=GOOGLE_PUBLIC_KEY"></script>

You can cuztomise text error:

<div class="valid-feedback">Name looks good</div>
<div class="invalid-feedback">Please provide a valid name</div>

YOU MUST ALLOW cURL OR allow_url_fopen AND php_openssl DIRECTIVE ON YOUR SERVER IN php.ini

  • extension=curl;
  • allow_url_fopen = On
  • extension=php_openssl.dll

Author

logo

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

Dependencies

About

Simple, customizable and secure bootstrap contact form Jquery FREE using Ajax, validations inputs, SMTP protocol, rejected domain and Google reCAPTCHA v3.

Topics

Resources

Stars

Watchers

Forks