Really Simple CAPTCHA
captcha image not change when click back (1 post)

  1. saintxiao
    Posted 4 years ago #

    when i submit the form success, and then i click back button on browser, back to my previous page, the captcha image not change.....help....

    here is the code
    $captcha_correct = false; //set it to false until proven true
    require_once(ABSPATH . 'wp-admin/admin-functions.php'); //include the WordPress admin functions file

    if (is_plugin_active(plugin_basename('really-simple-captcha/really-simple-captcha.php'))) { //check if the plugin is installed and active
    if (class_exists('ReallySimpleCaptcha')) { //check if the Really Simple Captcha class is available
    $captcha = new ReallySimpleCaptcha();

    if (!empty($_POST)) { //data has been posted by the user, lets check whats going on

    } else {
    $captcha_word = $captcha -> generate_random_word(); //generate a random string with letters
    $captcha_prefix = mt_rand(); //random number
    $captcha_image = $captcha -> generate_image($captcha_prefix, $captcha_word); //generate the image file. it returns the file name
    $captcha_file = rtrim(get_bloginfo('wpurl'), '/') . '/wp-content/plugins/really-simple-captcha/tmp/' . $captcha_image; //construct the absolute URL of the captcha image


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Really Simple CAPTCHA
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.