Indie,
Thanks for your help so far. Your suggestion worked perfectly!
The final piece of what I want to do is, after previewing the question, easily get back to editing it. I've thought of two ways to do this, but I haven't been successful in either.......
1.) Add a "Edit" button to preview_question.php that would take you to the proper edit_question_XXX.php page. I tried inserting...
} else if (isset($_GET['edit'])) {
$id = current($_GET['questions']);
$num_selected = count($id);
if ($num_selected == 1) {
$ids = explode('|', $id[0], 2);
$o = TestQuestions::getQuestion($ids[1]);
if ($name = $o->getPrefix()) {
header[red] ('Location: '.AT_BASE_HREF.'tools/tests/edit_question_'.$name.'.php?qid='.intval($ids[0])) [/red];
exit;
} else {
header('Location: '.AT_BASE_HREF.'tools/tests/index.php');
exit;
}
}
from question_db.php, but I couldn't get it to work.
2.) Add a "back" button to preview_question.php. However, that wil only take you back to create_question_xxx.php. My idea is to add code to create_question_xxx.php (with a button to activate it) that mirrors the code from edit_question_xxx.php that posts the information to the database.
Any further ideas on either of these? I think #1 would probably be easier, but I just couldn't get it to work.
Thanks again for the help.