![]() | |||||||
Simple Contact Form (UPDATED) 1 Attachment(s) This is an update of my Simple Contact Form script that I posted here which is very old and has many vulnerabilites. (all functions pulled from my Domain Name Portfolio script ;) ) Current Version: 1.0.6 (March 2, 2008) Changelog: 1.0.6 -Replaced current captcha with a whole new class and fonts -Added a captcha image refresh -Added new email headers -Cleaned up code 1.0.5 -New constant, USE_HTML - if set to false, HTML won't be used for email. -Added a new font "Acens.ttf" and removed one. -New function to determine if the server has GD and freetype support. -JS validation added to contact form (just checks if fields are empty atm) -Overall code cleanup. 1.0.4 -New constant, USE_CAPTCHA - if set to false, CAPTCHA won't be used. -Overall code cleanup. 1.0.3 -New constant, SPAM_NUM_LINKS, for the is_spam function. -Added CAPTCHA (requires GD2 w/FreeType) 1.0.2 -Improved functions + the new 'is_spam' function -New email headers (taken from phpBB's emailer class, and modified a tad) 1.0.1 -Functions file, with several functions to properly 'sanitize' input. -Better error handling, and email validation regex -Licensed under the GNU GPL Attached. Let me know if you have any problems. |
Thansk for making this one, i was using your previous one on a couple of my sites, i will update them right now! Thanks :) |
Cool, and no problem :) I may expand on it further sometime. |
blah its for vbulletin right? i did it on phpBB hahah but errors |
Nope...what makes you say that? |
There should also be a option for custom subject line...like subject to be input from the user. It would be more useful in that way. And regarding that if one forgets from where did the message came..we can use the text message from sitename in the message text itself. So it provides user of adding his own subject line also. |
Lovely! Thanks a lot! :( :cry: No, joking aside, its a very comprehensive and well written script. A little OTT in some places maybe, but I will definitely steal some bits from it for my own contact form if I may! :) |
I always take parts of SV's code. But whenever I do, I put PHP Code: Above it. SV is in more site's code than he knows :p |
:o |
hmm... for you SV, I will put it in <!-- --> comments! As then any wannabe script kiddie who views my source code will see your legacy! :lol: :) Tom |
Thanks for the Script, SecondVersion. I will use it in my new Fan Site after it is completed. |
Updated again :) |
hey SV, Im going to use that for two of my sites.. Thanks a lot man! Keep Rockin! |
Random CAPTCHA would be amazing. |
audit.php PHP Code: PHP Code: Code:
PHP Code: edit: Also, add session_start(); to index.php or the main page. [If it's not there.] |
CAPTCHA added, see first post. |
I'm getting an error. The script is working fine (I'm getting the eMail), but when the form is submitted, I get the following error: Feel free to test yourself at http://www.zamblo.com/contact_us.php. - Joey |
Edit functions.php, find this section Code:
and remove this part: Code:
|
Seems that your solution fixed the problem. Thanks! |
Thanks, looks good, but I'm having some problems. See: http://www.biospherical.net/contact1.html (try sending a message). It may be a simple problem, I don't know. Any ideas?? |
Note your url location on that one: http://www.biospherical.net/%3C?php%20echo%20$_SERVER['PHP_SELF'];%20?%3E I don't know .php , but I know I fixed all my problems with the script by chmod'ing everything correctly... Best, -Allan :gl: |
Try renaming the file to .php rather than .html. Also remove all this stuff from the top Code:
and also the </script> tag from the bottom. If you want all those head tags in the file, there's already a place in the php file to put it, go to line 51 and you'll see it. In the end, with the head tags you included, your file should look something like this - making sure it's called contact.php rather than .html - Code:
|
Thanks a lot B33R, it seems to work now!! (http://www.biospherical.net/contact.php) Just to check, there's no way to use the form in a .html file? Also, off topic, is there any way (using any web language) to use the html of one page in another, but with a simple command?? For example, on line of code takes the html from a specified page??! (I'm probably sounding stupid, but I don't know anything more than basic PHP - HTML and similar languages are the only ones I have a sort-of grasp on!!). |
iframe the entire thing into a .html file? That should work, no? -Allan |
Thank you Allan!...don't know why I didn't think of that!! :) :) |
| All times are GMT -7. The time now is 12:42 PM. |
Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0