Check IMG

G

Guest

Hi all,
Some web sites (for example mySpace) had in the registration form an image
with alfanumeric chars... used to check the submit
Could you say me ... how can I realize this ??
Or could you give me some link where I can read this ??
Thanks in advance.
//HH
 
L

Laurent Bugnion

Hi,
Hi all,
Some web sites (for example mySpace) had in the registration form an image
with alfanumeric chars... used to check the submit
Could you say me ... how can I realize this ??
Or could you give me some link where I can read this ??
Thanks in advance.
//HH

It's fairly easy. Put all these images in a folder. The image name
should carry the letters/digits sequence (for example, if the image
displays abc123, the image name could be abc123.gif) Then use
server-side code to randomly select one image from this folder. Save the
image name in a session variable. When the user sends the request,
compare what he entered to the variable saved in the session.

Note that these images have a huge inconvenient: They make pages
unaccessible for blind people. Usually web browsers for "visually
impaired" people use the title of the alt attribute to read the image's
description out loud, but obviously you cannot use this in your rendered
HTML code. So you need to provide your users with an alternative solution.

HTH,
Laurent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top