Hướng dẫn tạo PHP Mailer Form đính kèm File

Hướng dẫn tạo PHP Mailer Form đính kèm File

For a long time I have used a contact form that I have created, which is very simple. Recently I had to create a form that also allows for an attachment. The form I created is based on:

In any case, here is my version of the PHP email attachment form. Simple to implement in your web page. Allows one file to be attached to the email. Performs validation of: name, email, subject and message. Also validates certain file types and maximum size. No need for PHP knowledge. The script is well commented. Form is styled using CSS.

This script is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. This script is distributed in the hope that it will be useful, but without any warranty. I hope you find it useful.

Form Installation Instructions:

  1. You need to include (or require) the fns.php at the top of your page. Basically copy/paste the top and bottom of the index.php to your page (whatever is within the php tags) and adjust the path/to/fns.php
  2. Copy/paste the code within the #uploadform div to where you want it to be on your page
  3. Change the email address in the fns.php. There are a few other variables you can adjust if you wish around the same place as the email variable
Bạn thấy bài viết này như thế nào?: 
No votes yet
Ảnh của Khanh Hoang

Khanh Hoang - Kenn

Kenn is a user experience designer and front end developer who enjoys creating beautiful and usable web and mobile experiences.

Tìm kiếm bất động sản

 

Advertisement

 

jobsora

Dich vu khu trung tphcm

Dich vu diet chuot tphcm

Dich vu diet con trung

Quảng Cáo Bài Viết

 
Kinh nghiệm: CRM Core vs. Redhen pt. 1 - Differences in Philosophy

Kinh nghiệm: CRM Core vs. Redhen pt. 1 - Differences in Philosophy

While Drupal integrates with many 3rd-party systems, there has been a movement in the community for some time to build a native CRM that integrates seamlessly into the content management system.

Hướng dẫn nâng cấp Drupal 6 lên Drupal 7 hay Drupal 8

Hướng dẫn nâng cấp Drupal 6 lên Drupal 7 hay Drupal 8

Drupal 8 is not backward compatible, I think that's a good thing: you don't want to drag legacy stuff behind you. That's a big bucket on your boat.

Packt công bố kết quả cuộc bầu chọn CMS nguồn mở tốt nhất

Packt công bố kết quả cuộc bầu chọn CMS nguồn mở tốt nhất

Nhà xuất bản Packt vừa công bố các giải thưởng bầu chọn CMS nguồn mở tốt nhất trong năm 2011.

Công ty diệt chuột T&C

 

Diet con trung