Monday, October 10, 2011

Simple captcha with PHP

Simple captcha with PHP, We seen how to create a Simple captcha . Now we look how to integrate that simple Captcha with HTML Form. Now I am going to show you a Newsletter Subscriber with our Simple Captcha.

Simple captcha with PHP and Live Example with Newsletter
  • Show an image Captcha without any dependancies, such as Class, Function etc.,
  • Customizable code length, character sets, and Unicode support
  • TTF font support
  • Easily  customization: Background and Foreground colors
Kindly view  How to Create a Simple Captcha in PHP before the Newsletter Integration of this Capcha

Let me create a HTML form look like this


  $response="Invalid Email Address";
  $response="Invalid Verfification Code";
  //Save Email address
  $response="Subscribed! Thank you !";
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Simple Capcha : Example Form</title>
<style type="text/css">
body,td,th {
 font-family: Verdana, Geneva, sans-serif;
 font-size: 11px;
 color: #333;
body {
 margin-left: 10px;
 margin-top: 10px;

<form action="" method="post" name="subscribe">

<table border="0" cellspacing="0" cellpadding="5" style="border:1px solid #CCC;">
    <td colspan="2" bgcolor="#D6D6D6"><b>Subscribe Newsletter</b></td>

    <td>Email Address</td>
    <td><input name="email" type="text" id="email"></td>

    <td><input type="text" name="code" id="code" value="Enter code here" onFocus="this.value=''"></td>

    <img src="capcha_image.php" alt="Verify" width="75" height="25" style="border:2px solid #000;"></td>

    <td><input name="subscribe" type="submit" id="subscribe" value="Subscribe"></td>

    <td colspan="2">
    <?php echo @$response; ?>


Download This Script       View Demo Download Script

No comments:

Post a Comment