saradrungta Posted December 11, 2008 Share Posted December 11, 2008 hi friends, i m working on a project for my mca...... i.e. on Online Examination...... i m facing problem that supose i got 30 quesstions in database, nd using RAND function to get randdom question,,,, but i don't know how to eleminate the no which has been used once so that it doesn't appear again....... For Eg: i answered Question No5. so next time the same question should not appear..... pls help with your valuable advice..... thanks. Sarad Rungta Link to comment https://forums.phpfreaks.com/topic/136526-solved-problem-in-generating-rand-nopls-help/ Share on other sites More sharing options...
trq Posted December 11, 2008 Share Posted December 11, 2008 You will need to store what questions have been answered somewhere (ie a database), then each time you call rand() check to see if you have already answered the number it provides, if you have call it again untill you get a valid number.. Link to comment https://forums.phpfreaks.com/topic/136526-solved-problem-in-generating-rand-nopls-help/#findComment-712646 Share on other sites More sharing options...
saradrungta Posted December 11, 2008 Author Share Posted December 11, 2008 thanks.... Link to comment https://forums.phpfreaks.com/topic/136526-solved-problem-in-generating-rand-nopls-help/#findComment-712670 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.