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.
- 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
- PHP (Procedural)
- PHPMailer
- HTML5 / CSS3 / Bootstrap
- Git & GitHub
php-contact-form/ │── index.php # Contact form + PHP logic │── style.css # Optional custom styling │── README.md # Documentation │── /assets # (Optional) images/screenshots
- Clone the repo:
git clone https://github.com/dikewonsi/Contact-Form-PHPMailer.git
- Open the project in your local server environment (XAMPP, WAMP, Laragon, etc.).
- Install PHPMailer composer require phpmailer/phpmailer
- Configure email settings inside index.php: $mail->Host = 'smtp.example.com'; $mail->Username = 'you@example.com'; $mail->Password = 'yourpassword';
- Run the app → submit a test message → check your inbox.
👨💻 Author
Jeffrey Isibor
GitHub: @Dikewonsi