selecting images

what if i have different images on my page As choices for the user,
and the user select an image and then click a button to confirm his selection. unlike selection tags he can only choose one image , is it possible to do that using code?