DLloyd Posted April 18, 2015 Share Posted April 18, 2015 Hi everyone, i am marking a number of php questionnaire forms on my webpage and they connect up to a Mysql database, so far so good. However, the part i am having trouble with is... i need certain questionnaires to only be released for fixed periods of time (for example 1/2 weeks). Would anyone be able to help me out and give me some idea of how i would go about this? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/295674-php-questionnaire/ Share on other sites More sharing options...
ginerjm Posted April 18, 2015 Share Posted April 18, 2015 Define 'released'. Available for public perusal? Define '1/2 week'. Are you counting by days hours or seconds? Quote Link to comment https://forums.phpfreaks.com/topic/295674-php-questionnaire/#findComment-1509334 Share on other sites More sharing options...
DLloyd Posted April 18, 2015 Author Share Posted April 18, 2015 Hi, by released, i mean the questionnaire will be able to be selected by a member of the public, this will be when it is released, and before released it should be invisible. I currently have two questionnaires in a list box that users can select from. and in terms of '1/2 week', i would say counting by days would be my best option. Thanks again. Quote Link to comment https://forums.phpfreaks.com/topic/295674-php-questionnaire/#findComment-1509335 Share on other sites More sharing options...
ginerjm Posted April 18, 2015 Share Posted April 18, 2015 Assuming that the questionnaire contents are in a table which contains not only the questions but the title and a date field that you can call "release_date". Set that field to be the date you want it to be available and maybe have another field to close it so that when the page is called for and you query your db you select only those who have a release date and close date within your current window of time, ie, release <= today and expire >= today. Quote Link to comment https://forums.phpfreaks.com/topic/295674-php-questionnaire/#findComment-1509336 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.