Hello All,I have a requirement that is to have image x, shown when the user has first logged in, image y the second time logged in, then from the 3rd login the image should be image x 4th login image y 5th login should be x again 6th login should be y, you see a pattern here.
you need to store somewhere how many times the user has logged in. then simply take it mod 2 to determine which image to display.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Joined: May 31, 2007
Originally posted by fred rosenberger: you need to store somewhere how many times the user has logged in. then simply take it mod 2 to determine which image to display.
Thanks for your help. Can you please provide an example. I have the number of times the user has logged in, but ... you mean we must know how many images to display, her for example there are 2 images to display, thats the reason you are using mod 2, if there are n images then it will be mod n is it.