bobd0le
11-09-2011, 06:17 PM
I was unsure where to post this, if it belong in PHP or JavaScript, but i figure i'd try here first! (@Mods, if im wrong, feel free to move the thread over to JavaScript!)
Alright, here's my idea / problem.
I want to have it in a site so that only certain areas are viewable if an amount in a database is met - e.g. lets take the idea of "levels", so i could have a database table with peoples "levels" in different "subjects" (e.g. history / maths / science) and only if people have a certain "level" (which i could take from the database and put into a variable?) can they see / access that certain section.
I want to do it dynamically though, on page - so, lets say, we have a physics quiz - there are a total of 20 questions, and level's 1-4, the first 5 are intended for level 1, second 5 for level 2, third 5 for level 3 and fourth 5 for level 4. I want the higher levels to be able to see all of the lower levels aswell. e.g. level 4 can see all 20 questions, whereas level 2 could only see 10.
Is there a way to do this in PHP? (or in JavaScript).
I've use Visual Studio before which has the visible = true function, is there a PHP / JavaScript equivalent?
Any help / ideas are most certainly welcome!
Alright, here's my idea / problem.
I want to have it in a site so that only certain areas are viewable if an amount in a database is met - e.g. lets take the idea of "levels", so i could have a database table with peoples "levels" in different "subjects" (e.g. history / maths / science) and only if people have a certain "level" (which i could take from the database and put into a variable?) can they see / access that certain section.
I want to do it dynamically though, on page - so, lets say, we have a physics quiz - there are a total of 20 questions, and level's 1-4, the first 5 are intended for level 1, second 5 for level 2, third 5 for level 3 and fourth 5 for level 4. I want the higher levels to be able to see all of the lower levels aswell. e.g. level 4 can see all 20 questions, whereas level 2 could only see 10.
Is there a way to do this in PHP? (or in JavaScript).
I've use Visual Studio before which has the visible = true function, is there a PHP / JavaScript equivalent?
Any help / ideas are most certainly welcome!