summaryrefslogtreecommitdiff
path: root/acknowledge.php
blob: c4fcddb0b4b0fdb540534a5d75cf142d44ae73f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
    require_once('db-connect.php');
    $book_id = $_POST['book_id'];
    $output = "";

    $query = "select * from textbook_companion_preference where id = {$book_id}";
    $result = mysql_query($query);
    if (!$result) {
        echo 'Could not run query: ' . mysql_error();
        exit;
    }
    $preference =mysql_fetch_array($result);

    $query = "select * from textbook_companion_proposal where id = {$preference['proposal_id']}";
    $result = mysql_query($query);
    if (!$result) {
        echo 'Could not run query: ' . mysql_error();
        exit;
    }
    $proposal = mysql_fetch_array($result);

    $output .= "<div class='contributor'><b>Contributor:</b> {$proposal['full_name']} </div>";
    $output .= "<div class='teacher'><b>Mentor:</b> {$proposal['faculty']} </div>";
    $output .= "<div class='reviewer'><b>Book Reviewer:</b> {$proposal['reviewer']} </div>";
    $output .= "<div class='download'><b>College Name:</b> {$proposal['university']} </div>";
    echo $output;
?>