Hi,
The problem is that a Uni I am creating a PHP/MySQL based game.
I have got it working for multi user movement and picking up objects but the trouble im having is implementing the puzzles into it.
I have the user table which has my puzzles as:
puzz_1, puzz_2, puzz_3, puzz_4, puzz_5, puzz_6
this is where im saving whether the user has completed it yet or not and my puzzles are saved in another table with all their information, key words, item required etc.
I would be able to complete this section but I am having trouble selecting the puzzle from the MySQL database in the user table.
I need to be able to select from the different fields and haveing googled saw no way to do it.
Basically what i need is:
SELECT * from user_info WHERE id = ' . $_SESSION['userid'] . ' AND ' . puzz_whatever . ' = ' . $dbroomno . '
If anyone has any ides this would be amazing as it would save me having to write an if statement for each puzzle.
Daryll