Best supporting actor is...
";
$key = 'supporting';
$nid = '9078';
$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)) {
if (empty($_POST['explain'])) {
$sql = "insert into {survey10} (uid, q, a) values (%d, '%s', '%s')";
db_query($sql, $user->uid, $key, $_POST['a']);
} else {
$sql = "insert into {survey10} (uid, q, a, other) values (%d, '%s', '%s', '%s')";
db_query($sql, $user->uid, $key, $_POST['a'], $_POST['explain']);
}
print 'Thanks for taking our survey. Your answer has been included in the results below.';
} else {
if ($user->uid) {
if ($count == 0) {
?>
Comments:
"; $sql = "select a, other from {survey10} where q='%s' and other is not null"; $result = db_query($sql, $key); while($data = db_fetch_object($result)) { print "" . $data->a . ": " . $data->other . "