Comment System With Captcha Using PHP
Submitted by argie on Friday, June 1, 2012 - 13:29.
Language
In this program you will learn on how to create a comment system with captcha using PHP/MySQL. This comment system allows also to add sub comment. This system also uses captcha to prevent comments from spamming. It also gives an error message so that the user will be informed that the input captcha code is incorrect.
database name: commentsystem
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.
Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE:
1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
Comments
Error ....!!
Name:
( ! ) Notice: Undefined index: id in C:\wamp\www\commentsys\captcha\index.php on line 162
Call Stack
# Time Memory Function Location
1 0.0053 385048 {main}( ) ..\index.php:0
" />
Nice one..
Nice one.. Thank you !!
@ANONYMOUS : I got the same error. I solved it by adding the following code just above the line where we use $_Get['id']
Injection attacks.
Some pretty glaring abilities to perform mysql injection with this system out of the box, but a nice base to start with; thanks. I don't suggest using it "as is" though, because it could compromise your site quite easily.
Make sure you sanitize all your _POST strings before inserting them into your mysql query. I'd suggest instead that you use prepared statements.
Robbie
Add new comment
- Add new comment
- 186 views