Location: PHPKode > projects > BotDetect CAPTCHA > BotDetect-PHP-CAPTCHA-Component-vAlpha1-Build201202051720/WebApp/PhpFormCaptchaSample/Messages.php
<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
  <title>BotDetect CAPTCHA PHP Form Sample</title>
  <link type="text/css" rel="Stylesheet" href="StyleSheet.css" />
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

  <h1>BotDetect CAPTCHA PHP Form Sample</h1>
  <h2>View Messages</h2>

    $count = 0;
    foreach($_SESSION as $key => $val) {
      if (false !== strpos($key, "Message_") && isset($val)) {
        echo "<p class='message'>${val}</p>";
    if ($count == 0) {
      echo '<p class="message">No messages yet.</p>';
  <br />
  <p class="navigation"><a href="index.php">Add Message</a></p>
  <div id="notes">
    <div class="note">
      <p>This sample project shows how to add BotDetect CAPTCHA protection to a typical PHP form.</p> 
      <p>Captcha validation is integrated with other form fields validation, and only submissions that meet all validation criteria are accepted.</p> 
      <p>This kind of validation could be used on various types of public forms which accept messages, and are at risk of unwanted automated submissions.</p> 
      <p>For example, it could be used to ensure bots can't submit anything to a contact form, add guestbook entries, blog post comments or anonymous message board / forum replies.</p> 
Return current item: BotDetect CAPTCHA