ajicles Posted July 17, 2010 Share Posted July 17, 2010 I feel bad, I made the worlds worst captcha system ever! It is a simple captcha system, it works by php getting a rand number from one to ten and then echos the number back and asks the user to enter what the number times 2 is and then there is a hidden div holding the random number and gets pass to another page that uses an if statement to see if the answer is wrong. I was wonder what you guys have to say and any suggestions? <form id="myform" onSubmit="return mysubmit();" enctype="multipart/form-data" action="uploadfiles.php" method="POST"> Select file:<br> <input name="FileData" type="file" /> <br> <br /> For security reasons please solve the question below: <br /> What is <?php echo $randINT; ?> + <?php echo $randINT; ?> <input name="captcha" type="text" /> <br /> <input type="submit" value="Upload" /> <br> <div id="captchadata" style="visibility:hidden"> <input name="captchadata" type="text" value="<?php $randINT = $randINT*2; echo $randINT; ?>" /> </div> </form> uploadfiles.php if ($_POST['captcha'] == $_POST['captchadata']){ //correct and submits files } else { //wrong please go back and enter correctly. } I fail lol. Link to comment https://forums.phpfreaks.com/topic/208011-captcha-erm-error/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.