Contact form with mail function and Storing data in the database – Mini Project

54

- Advertisement -

Project Name Contact form with mail function and Storing data in the database
Language Used PHP5.6, PHP7.x
Database MySQL 5.x
User Interface Design HTML, AJAX,JQUERY,JAVASCRIPT
Web Browser Mozilla, Google Chrome, IE8, OPERA
Software XAMPP / Wamp / Mamp/ Lamp (anyone)
Last Updated 24 April 2021

Contact form with mail function and Storing in the database project has two modules:

  • User Module
  • admin Module

User Module

SQL table structure for tblcontactdata table where we will store our data

Now create an HTML for user inputs. index.php

MySQL database connection

Insert Data into Database

Admin Module

Admin Panel Features 

  • Secure login with password hashing
  • Admin Dashboard
  • Manage Contact’s
  • Report’s
  • Update Remark on the particular contact
  • Notification feature(Admin can get the notification on every contact)
  • Admin Can update email id where he/she want to receive email.
  • Change Password.
  • Logout.
In this project admin and user will a get copy of contact form  on email. Email function will not work on localhost .
Some of the Project Screens

Home Page

Contact-Form-With-Mail-function-and-Database-store-Facility-Home-Page

Admin Dashboard

Contact-Form-Admin-Dashboard

How to run Contactform Mini Project

1. Download the zip file
2. Extract the file and copy the contactform folder
3.Paste inside root directory(for xampp xamp/htdocs, for wamp wamp/www,for lamp var/www/HTML)
4. Open PHPMyAdmin (http://localhost/phpmyadmin)
5. Create a database with name contactdb
6. Import newsportal.sql file(given inside the zip package in an SQL file folder)
7.Run the script http://localhost/contactform (frontend)
8. For admin panel http://localhost/contactform/admin
Credential for admin panel :
username  : admin
Password : Test@123
Video Project Demo————

LIve Project Demo————

Contact form with mail function and Storing data in the database – Mini Project (Full Source Code)
Size: 19.4 MB
Version: V 2.0

- Advertisement -

Leave A Reply

Your email address will not be published.

54 Comments
  1. v.vasilopoulos says

    Hi,
    From the admin page all-contacts.php i get ???????????? instead of the name.
    My language is Greek

    1. Anuj Kumar says

      change collation of table mysql

      1. V.Vasilopoulos says

        HI,
        1. How to change the admin password?
        2. How to add more admin accounts?

        i tried to add second admin username and password, but it does not login.
        I tried to change the admin password, but it does not login.
        i tried to change the admin password, and save as md5. but it does not login.

        Thanks in advance for your time,

        1. Anuj Kumar says

          After login, you can change the admin password. For a new admin, you have to insert a new record in the database. Password must be encrypted using MD5

  2. sankar says

    sir, I’m not getting mail on contact form sir.. but data is stored in database.. please give me a solution on this..

    1. Anuj Kumar says

      Mail function will not work on localhost.

      1. sankar says

        Then what to do sir, I can’t understand.. should i have to install any software? please reply…

  3. Likhitha says

    sir, I’m not getting mail on contact form sir.. but data is stored in database.. please give me a solution on this..

    1. Anuj Kumar says

      Mail function will not work on localhost.

  4. Alvaro says

    Great Work and idea. Really helpful
    Sir. I run it on Online host, but the admin panel DO NOT responsive. Dashboard to. What i miss? The css?

    1. Anuj Kumar says

      I will the issue and fix it asap

  5. alvaro says

    Hello Sir. can i get css file in assets/css/style.css… i download the project but Admin index and dashboard NOT responsive.

  6. Yogesh Sharma says

    Hi, Is it possible to add file attachment feature in this form, As we need to implement this. Hence we need your help in this.
    If possible kindly provide the code so that, we can implement the same
    thanks in advance

    1. Anuj Kumar says

      Yes, I will add this feature in next version.

  7. Bhavana says

    Sir please can I have a complete report for this project with perfect abstraction, objectives etc..

    1. Anuj Kumar says

      Not available.

  8. Bonnie says

    hi First thank you so much I have learn’t a lot. Everything working but would be good to be able to delete emails in admin. could you tell me how I could intergrate it.
    many thanks

  9. tj says

    Connection failed: php_network_getaddresses: getaddrinfo failed: Name or service not known
    how can i solve this on live server

  10. praveen says

    admin login not working i have tried everthing to chnge password but not login .i have used Test@123 lso but not open admin????

    1. Anuj Kumar says

      Username is admin and Password is Test@123

  11. Randell Carrol says

    voila le document dont je vous ai parle. tu peut voir sur https://phpgurukul.com/user-registration-login-and-user-management-system-with-admin-panel/comment-page-4/ que c’est bon.

  12. ink says

    Sir mail function not working even if we host the project..

    1. Anuj Kumar says

      Check with your hosting provider for mail service.

  13. dinesh says

    Notice: Undefined variable: headers in D:\xampp\htdocs\contactform\index.php on line 41
    Notice: Undefined variable: ms in D:\xampp\htdocs\contactform\index.php on line 47
    Warning: mail(): Failed to connect to mailserver at “localhost” port 25, verify your “SMTP” and “smtp_port” setting in php.ini or use ini_set() in D:\xampp\htdocs\contactform\index.php on line 49

    1. Anuj Kumar says

      Mail function will not work on localhost. Comment the mail in localhost.

  14. ink says

    How to change colour of the bg !,where to change the code to change the BG colour etc . And how to send mail from database

    1. Anuj Kumar says

      You can change in CSS file.

  15. ink says

    How to change colour of the bg !,where to change the code to change the BG colour etc

  16. ink says

    Sir MIME Service is not working, mail is not getting sent . data are getting stored in db but not going to email, i have changed the email to my personal one in admin side page.

    1. Anuj Kumar says

      Mail function will not work on localhost.

      1. ink says

        How to send email through localhost ? is there a way to do that

        1. Anuj Kumar says

          Use SMTP

  17. max says

    Dear, I am unable to get a login at the admin page, There might be an Error.
    i have checked and verified everything like a sql database, config file etc… but the problem is going to be same…

    1. Anuj Kumar says

      Username is admin and password is Test@123

Leave A Reply

Your email address will not be published.