I’d like to create a multiplayer quiz and I have a little issue since two days. I tried to search for a solution on google and in the forums, but didn’t get any additional information.
My game should get the questions directly from a mysql database. How can I set up a connection, so that the game gets random questions from the DB?
Second question is: how can I define, which questions (out of four possible) is the correct one?
To get the questions use the Ajax plugin to retrieve the questions from a PHP script which itself will query the mysql db using something like
SELECT question FROM questions ORDER BY RAND() LIMIT 1
which should get 1 random question, though your probably getting a lote more in one hit and returning a json array to populate an array or something.
thx a lot for the fast answer.
can u show me with a *.capx file or screenshots an example please
Develop games in your browser. Powerful, performant & highly capable.
ok i have no idea how i realize that have any one a idea