Hi to You all! I'm having some problems with getting query from database, here's the script:
PHP Code:
$qProfile = "SELECT * FROM cg_riddles WHERE status = 1 ORDER BY RAND() LIMIT 1 ";
As u can see, it takes one random entry (let's say it's a question) from DB, in next part of the script user have input form where he's posting answer.
What do i want to do is: if user answer is right, he's getting next question, but i need to do something, that the question won't repeat.
I was thinkin about coockies, then session, but i'm kind a php newbie, and there's a problem. i was trying with:
PHP Code:
$_SESSION[ids]=array();
array_push($_SESSION[ids],$id);
but that ain't workin well, that ain't workin at all :P.
My question: what's the best way to do what i want to do? Mayve string? Any ideas? And maybe links to something i could read that help me?
[sorry for my english]
|