DOWNLOAD CONTACT US FORM - COMPLETE CODE FRONT END AND BACK END
Add CONTACT US form to your site in less than 5 minutes with out re inventing the wheel. These are the features of the following project
- Responsive HTML5 and CSS3 Form.
- Front end JavaScript input validations.
- Ajax Form submit
- Form status indication like on loading etc
- Back end validations with PHP (can't trust no one these days)
- Use of MySql Prepared Statements in the back end to avoid injections.
- What more do you want ?
Let's begin our tutorial.
STEP 1 - DOWNLOAD CONTACT US FORM CODE
Go to the official project GitHub repository , Download and extract all files to your project directory.
DatabaseConnect.php
README.MD
contact-us.html
create-table.php
process-contact-us.php
STEP 2 - CREATE MYSQL DATABASE
If you haven't created a database for your contact us data, create one and give it whatever name you want.
If you already have a database, then ignore STEP 2.
STEP 3 - MYSQL SERVER CONNECTION PARAMETERS
Open DatabaseConnect.php and edit $connectionConfig inside __construct() as per your server settings.
IMPORTANT - DatabaseConnect.php :
Before We go to Next step , make sure Database supplied in $connectionConfig["database"] already exists on the server and the user supplied in $connectionConfig["user"] has necessary privilages on it.
STEP 4 - CREATE TABLE FOR CONTACT_US DATA
Run create-table.php on your server, if you supplied valid parameters in STEP 3 , You will get a message that says Congrats , Your Contact Us Form is up and running.
That's it!! Open contact-us.html to see your Contact Us Form. Try it and see the data being reflected in contact_us table of the database you supplied in STEP 3
ALTERNATE TITLES