If I could only be alone ...
';
$key1 = 'bond_cast';
$key2 = 'bond_artist';
$key3 = 'bond_audience';
$sql = "select count(a) from {survey} where q like '%s' and uid=%d";
$count = db_result(db_query($sql, 'bond%', $user->uid));
if (isset($_POST['submit'])) {
if (!empty($_POST['bond1'])) {
$sql = "insert into {survey} (uid, q, a) values (%d, '%s', '%s')";
db_query($sql, $user->uid, $key1, $_POST['bond1']);
}
if (!empty($_POST['bond2'])) {
$sql = "insert into {survey} (uid, q, a) values (%d, '%s', '%s')";
db_query($sql, $user->uid, $key2, $_POST['bond2']);
}
if (!empty($_POST['bond3'])) {
$sql = "insert into {survey} (uid, q, a) values (%d, '%s', '%s')";
db_query($sql, $user->uid, $key3, $_POST['bond3']);
}
print 'Thanks for taking our survey. Your answer has been included in the results below.';
} else {
if ($user->uid) {
if ($count == 0) {
?>
Results for best dressing room to bond with the cast:
- ";
while ($data = db_fetch_object($result)) {
print '
- ' . $data->a . ' (' . $data->count_a . ') '; } print '
Results for best backstage for secret love affairs:
- ";
while ($data = db_fetch_object($result)) {
print '
- ' . $data->a . ' (' . $data->count_a . ') '; } print '
Results for best place for onstage nude scenes:
- ";
while ($data = db_fetch_object($result)) {
print '
- ' . $data->a . ' (' . $data->count_a . ') '; } print '