This is contact form using PHP-Mailer library with gmail SMTP server. I coded this project to practice on my knowledge of HTML, CSS, jQuery, and PHP in a real project.
Here are some ideas to benefit from this project:
- Take this project as a task and try to make it, and if you could not do a specific section, see how I make it in the source code (use comments to reach this section).
- Extract a code of a specific section and use it in your project.
- Review source code to see how other people code their projects.
- Edit on this project after studying its code well, to know how to work in pair-programming with other people
- Upgrade this project, and add your own sections or pages
Here are the guidelines to run this project on your localhost:
- Download, then install XAMPP web server
- Download this project, then rename its directory to
contact-form
- Copy the
contact-form
directory to thehtdocs
directory which exists in XAMPP installation path - Start XAMPP control panel from your Desktop, then start
Apache
web server - Open your browser, and type
http://localhost/contact-form
, to open the application
Here are some configurations to do in the index.php
file:
- Set the
$mail->Username
(line: 37) to your google email (ex: example@gmail.com). This email will be used to send messages from google - Set the
$mail->Password
(line: 39) to your google password for previous email - Set the
$mail->addAddress
(line: 46) to your google email, and your name. This email will be used to receive messages
In the
$mail->Username
, you should add a google email which allow the Less Secure App Access, otherwise the message will not be sent with this email. You can manage this from google email security settings
- HTML
- CSS
- Bootstrap
- JavaScript
- jQuery
- PHP
This application is fully responsive
If you find my work good, consider giving it a ⭐ or fork-ing to show some ❤️. It helps me stay on track and be motivated.
Explore all of my projects from Here