If only they had dramaturgs during the Renaissance...
";
$key = 'dramaturg';
$nid = '9075';
$sql = "select count(a) from {survey10} where q='%s' and uid=%d";
$count = db_result(db_query($sql, $key, $user->uid));
if (isset($_POST['submit']) && ($_POST['flag_id']==$nid)) {
$sql = "insert into {survey10} (uid, q, a) values (%d, '%s', '%s')";
if (!empty($_POST['other'])) {
db_query($sql, $user->uid, $key, $_POST['other']);
} else {
if (!empty($_POST['a'])) {
db_query($sql, $user->uid, $key, $_POST['a']);
}
}
print 'Thanks for taking our survey. Your answer has been included in the results below.';
} else {
if ($user->uid) {
if ($count == 0) {
?>