Image Captcha AJAX Refresh
Moderator: General Moderators
Image Captcha AJAX Refresh
I'm using my own captcha image i created with PHP, and When a refresh button is pressed, I want it to cycle through the characters and create another captcha image. How would I so this using jQuery's AJAX and PHP to do this without refreshing the page?
- Kaleb Klein
------------------------------------
Web Developer | Software Developer
https://kalebklein.com
PGP Key: https://keybase.io/pazuzu156
------------------------------------
Web Developer | Software Developer
https://kalebklein.com
PGP Key: https://keybase.io/pazuzu156
- phazorRise
- Forum Contributor
- Posts: 134
- Joined: Mon Dec 27, 2010 7:58 am
Re: Image Captcha AJAX Refresh
You don't need Ajax to do this.
You can simply use-
I use same thing on my site.
You can simply use-
Code: Select all
<img src="captcha_file.php?sid=<?php echo md5(time()) ?>" id="cap_img">
<a href="#"onclick="document.getElementById('cap_img').src = 'captcha_file.php?sid=' + Math.random(); return false">Refresh</a>
Re: Image Captcha AJAX Refresh
I'll work with it some, thanks.
- Kaleb Klein
------------------------------------
Web Developer | Software Developer
https://kalebklein.com
PGP Key: https://keybase.io/pazuzu156
------------------------------------
Web Developer | Software Developer
https://kalebklein.com
PGP Key: https://keybase.io/pazuzu156