Skip to content

Dikewonsi/Contact-Form-PHPMailer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Contact Form

A simple contact form built with PHP that allows users to send messages via email.
The project includes form validation, error handling, and email delivery using PHPMailer.


✨ Features

  • Input validation (name, email, message)
  • Input sanitization (XSS and SQL injection protection)
  • Error and success messages
  • Email sending with PHPMailer
  • Bootstrap styling for clean UI
  • Lightweight and beginner-friendly

🛠️ Technologies Used

  • PHP (Procedural)
  • PHPMailer
  • HTML5 / CSS3 / Bootstrap
  • Git & GitHub

📂 Project Structure

php-contact-form/ │── index.php # Contact form + PHP logic │── style.css # Optional custom styling │── README.md # Documentation │── /assets # (Optional) images/screenshots


⚙️ Setup Instructions

  1. Clone the repo:
    git clone https://github.com/dikewonsi/Contact-Form-PHPMailer.git
  2. Open the project in your local server environment (XAMPP, WAMP, Laragon, etc.).
  3. Install PHPMailer composer require phpmailer/phpmailer
  4. Configure email settings inside index.php: $mail->Host = 'smtp.example.com'; $mail->Username = 'you@example.com'; $mail->Password = 'yourpassword';
  5. Run the app → submit a test message → check your inbox.

Screenshots

Contact Form (Default)

Form Default

Validation Errors

Validation Errors

Successful Submission

Success Message

Email Received

Email Inbox

👨‍💻 Author

Jeffrey Isibor

GitHub: @Dikewonsi

About

A simple contact form built with PHP that validates input and sends emails using PHPMailer.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages