PHP Simple Contact Form
May 9th, 2008 | Posted in Goodies, Scripts |
As requested, here is the contact form that I’ve created and have been using for a long time. Again, should be very simple to implement in your web page. Performs validation of: name, email, subject and message. 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. Let me know what you think.
Installation Instructions:
- You need to include (or require) the fns.php at the top of your page
- Copy/paste the code within the #contactform div to where you want it to be on your page
- Change the email address in the fns.php
Download
Simple Contact Form Script (.zip, 8kb)

May 26th, 2008 at 4:07 pm
Hi. Sorry, i’m new to php,
I’m trying to add a “file attachment” function to my form.
but i have a hard time understanding the instruction:
1. You need to include (or require) the fns.php at the top of your page
2. Copy/paste the code within the #contactform div to where you want it to be on your page
3. Change the email address in the fns.php
i hope you can help me.
May 26th, 2008 at 5:52 pm
Jason,
First of all you are downloading a contact form only. Check the other script for file attachment function.
Second, the download includes 2 files. Check the start of the index.php file to see how to require() the fns.php.
You will also need to open fns.php in a text editor, find the var that defines where to send the email and change it (it is also commented).
In regards to point 2 in the instructions, you should at least know HTML.
HTH