IdioticMe Posted December 17, 2011 Share Posted December 17, 2011 This is my first captcha script...it has 2 files, check.php and insert.php It works fine but I would like to hear your opinion what can I do to make it better? Is there any way that I can add random images ? Here is insert.php <html> <body> <form action="check.php" method="post"> <img src="captcha.jpg"/> Insert captcha: <input type="text" name="cap"/> <input type="submit" value="submit"/> </form> </body> </html> here is check.php <html> <body> <?php $cap= "flirc"; if ($_POST["cap"]==$cap) echo "Captcha is right!"; else echo " Captcha is wrong! "; ?> </body> </html> It is pretty basic, I know You can see it in action here Quote Link to comment https://forums.phpfreaks.com/topic/253393-first-captcha-script/ Share on other sites More sharing options...
melloorr Posted December 17, 2011 Share Posted December 17, 2011 How about storing the images in a database, along with the right captcha then use RAND() to call a random one each time? Quote Link to comment https://forums.phpfreaks.com/topic/253393-first-captcha-script/#findComment-1298915 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.