helo frds, i m working on registration form.I have to match the image code with user code entered by the user. please tel me how to compare.I am sending the file through which i have generated the code. thanks
make random images. Gave them as the text on the image. For example if the image display 12345 then save that image as 12345. now select a random image . Compare the image name with the user entered text. Hope that this will help you
Hmm... not as simple as that as it won't take long before the spam bots just look at the image name! I've never done anything like that, but as far as I can work out, you can't have anything client side that is related to the value: even a hash in a cookie can be manipulated. If it were me, I'd set a session variable, send the image and then compare the user input against the session variable.
Store the image name in table with the correct code against it? E.g. Image shown = 12345 Image filename = Xj7Rw Lookup table entry for Xj7Rw --> 12345
1. save image text in session as $_SESSION 2. display created image 3. compare user_code with $_SESSION[code] :) Code (markup):