Title: Comment Random Issue
Last modified: August 21, 2016

---

# Comment Random Issue

 *  [M A Vinoth Kumar](https://wordpress.org/support/users/vinoth06/)
 * (@vinoth06)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/comment-random-issue/)
 * Hello,
 * Am developing a plugin for comment captcha. I have around 5 techniques for captcha
   and put each technique in separate file. Just consider if the user select the
   first technique then I will include that particular file, if second technique,
   then second file will be included
    respectively, sample coding below
 * (eg) if($option==1)
    include (‘file1.php’); if($option==2) include (‘file2.php’);...
   if($option==5) include(‘file3.php’);
 * Suppose user need to be a random the option value is 6, problem arises.
    (eg)
   if($option==6) $option=rand(1,5); if($option==1) include (‘file1.php’); if($option
   ==2) include (‘file2.php’); . . . if($option==5) include(‘file3.php’);
 * Just consider, if i select the random option and I got random number 1 and the
   file1 will be loaded and waiting for that captcha, suppose if i enter the wrong
   captcha value, it will not work and the error throws on another file may be file3.
   php, but am entering for file1.php modeled captcha value.
 * Note: If i select any one particular captcha model like model1, then it will 
   work perfect for correct and incorrect results.
 * Please suggest me

Viewing 1 replies (of 1 total)

 *  Thread Starter [M A Vinoth Kumar](https://wordpress.org/support/users/vinoth06/)
 * (@vinoth06)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/comment-random-issue/#post-4244433)
 * Here is the exact plugin
 * [http://buffercode.com/wp-content/uploads/2013/10/a-very-simple-capthca-beta.zip](http://buffercode.com/wp-content/uploads/2013/10/a-very-simple-capthca-beta.zip)
 * Select random in admin panel and check.
 * It will generate the random image but when we enter either wrong captcha or captcha
   box empty, it will give error and loads other captcha model.
 * Please suggest me.

Viewing 1 replies (of 1 total)

The topic ‘Comment Random Issue’ is closed to new replies.

## Tags

 * [comment](https://wordpress.org/support/topic-tag/comment/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [M A Vinoth Kumar](https://wordpress.org/support/users/vinoth06/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/comment-random-issue/#post-4244433)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
