session_start();
$sessid = session_id();
mysql_connect("localhost","mmaaaco_ksecor","hamilton");
mysql_select_db("mmaaaco_ksecor");
?>
Untitled Document
$sql = mysql_query("select questionid,question,questiontype
from 3312questions where questionid
not in (select question from 3312useranswers where sessid = '$sessid') order by rand() limit 1");
$row = mysql_fetch_row($sql);
echo $row[1]."
";
$qid = $row[0];
$questiontype = $row[2];
$anssql = mysql_query("select answer from 3312canswer where questionid = '$qid'
union
select answer from 3312wanswers where questionid = '$qid' order by rand()");
if (!$anssql) echo mysql_error();
echo '';
?>