summaryrefslogtreecommitdiffstats
path: root/system/helpers/captcha_helper.php
diff options
context:
space:
mode:
authorPreetham <me@preetham.in>2014-12-05 03:01:52 +0100
committerPreetham <me@preetham.in>2014-12-05 03:01:52 +0100
commite29136567e2a12726f9ab40762bcb47a7cde759c (patch)
tree71c7282f416a9ca940fc086fca62f4cdcb062a48 /system/helpers/captcha_helper.php
parent0972c2194e1bd66e6a399c61c31da68333db426e (diff)
closing #51. Added img_id and img_name in capcha helper
Signed-off-by: Preetham <me@preetham.in>
Diffstat (limited to 'system/helpers/captcha_helper.php')
-rw-r--r--system/helpers/captcha_helper.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php
index 2ffa86d97..a105b344b 100644
--- a/system/helpers/captcha_helper.php
+++ b/system/helpers/captcha_helper.php
@@ -72,6 +72,8 @@ if ( ! function_exists('create_captcha'))
'expiration' => 7200,
'word_length' => 8,
'font_size' => 16,
+ 'img_id' => '',
+ 'img_name' => '',
'pool' => '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
'colors' => array(
'background' => array(255,255,255),
@@ -244,7 +246,7 @@ if ( ! function_exists('create_captcha'))
return FALSE;
}
- $img = '<img src="'.$img_url.$img_filename.'" style="width: '.$img_width.'; height: '.$img_height .'; border: 0;" alt=" " />';
+ $img = '<img id="'.$img_id.'" name="'.$img_name.'" src="'.$img_url.$img_filename.'" style="width: '.$img_width.'; height: '.$img_height .'; border: 0;" alt=" " />';
ImageDestroy($im);
return array('word' => $word, 'time' => $now, 'image' => $img, 'filename' => $img_filename);