<td align="left" width="100%" style="21; background-color: #FFFFFF;">
            <table class="style26">
                <tr>
                    <td class="style27">
                        <a href="index.html">Home</a> &gt; <a href="screenings.php">Screenings</a><br />
                        <hr style="height: -12px; margin-top: 0px" />
                    </td>

                </tr>
                <tr>
                    <td class="style28">
                        Screenings:<br />
<?php 
include "includes/functions.php";
my_mysql_connect();
$query_results = my_trusted_mysql_query("SELECT EVENT.Event_ID, Event_Name, Start_Date, Start_Time, End_Date, End_Time, Location_Name, Address, City, State, Zip FROM EVENT JOIN LOCATION ON (EVENT.EVENT_ID = LOCATION.EVENT_ID) WHERE E_Type = 's'");
echo "<table border='1'>";
echo "<tr>";
//Print out the table headers
foreach ($query_results[0] as $key => $value) {
    echo "<th>{$key}</th>";
}
echo "</tr>";
//Print out each row
foreach ($query_results as $row) {
    echo "<tr>";
    foreach ($row as $key => $value) {
        if ($key == "Event_ID") {
            echo "<td><a href='http://group13.x10hosting.com/screening_part_manip.php'>{$value}</a></td>";
        } else {
            echo "<td>{$value}</td>";
<?php

include 'sessionHandler.php';
?>

<?php 
include "includes/functions.php";
// If there is no user, the questionnaire filling out is useless
if (isset($_SESSION["AcctNumber"])) {
    // connect to the database
    my_mysql_connect();
    $result = array();
    // Prepare the query
    $sql = "UPDATE GameSubGenreQuestionnaire SET " . "fighting=" . $_POST["Fighting"] . ", " . "driving=" . $_POST["Driving"] . ", " . "wrpg=" . $_POST["WRPG"] . ", " . "jrpg=" . $_POST["JRPG"] . ", " . "baseball=" . $_POST["Baseball"] . ", " . "basketball=" . $_POST["Basketball"] . ", " . "golf=" . $_POST["Golf"] . ", " . "boxing=" . $_POST["Boxing"] . ", " . "mma=" . $_POST["MMA"] . ", " . "wrestling=" . $_POST["Wrestling"] . ", " . "football=" . $_POST["Football"] . ", " . "hockey=" . $_POST["Hockey"] . ", " . "miscellaneous=" . $_POST["Miscellaneous"] . ", " . "realTime=" . $_POST["RealTime"] . ", " . "turnBased=" . $_POST["TurnBased"] . ", " . "dancing=" . $_POST["Dancing"] . ", " . "singing=" . $_POST["Singing"] . ", " . "instruments=" . $_POST["Instruments"] . ", " . "fps=" . $_POST["FirstPerson"] . ", " . "tps=" . $_POST["ThirdPerson"] . ", " . "shmup=" . $_POST["ShootEmUp"] . ", " . "railShooter=" . $_POST["RailShooter"] . ", " . "trivia=" . $_POST["Trivia"] . " WHERE AccountNumber='{$_SESSION['AcctNumber']}'";
    $result = my_trusted_mysql_query($sql);
    $_SESSION["QuestionnaireFilled"] = 1;
    my_mysql_close();
    header('Location: http://minersoft.org/gamewarp/questionnaire.php');
} else {
    header('Location: http://minersoft.org/gamewarp/newaccount.php');
}
<?php

include 'sessionHandler.php';
?>

<?php 
include "includes/functions.php";
// If there is no user, the questionnaire filling out is useless
if (isset($_SESSION["AcctNumber"])) {
    // connect to the database
    my_mysql_connect();
    // Prepare the query
    $sql = "UPDATE TheatricalSubGenreQuestionnaire SET " . "wwii=" . $_POST["WorldWarTwo"] . ", " . "postApocalyptic=" . $_POST["PostApocalyptic"] . " WHERE AccountNumber='{$_SESSION['AcctNumber']}'";
    echo "{$sql}";
    my_trusted_mysql_query($sql);
    $_SESSION["QuestionnaireFilled"] = 1;
    my_mysql_close();
    header('Location: http://minersoft.org/gamewarp/questionnaire.php');
} else {
    header('Location: http://minersoft.org/gamewarp/newaccount.php');
}
//See if the page was called with POST data, meaning this page has been called before
if (isset($_POST['submit'])) {
    //Copy $_POST data, sanitizing it to prevent SQL injection attacks.
    $q = safe_inputs($_POST);
    my_mysql_connect();
    //Check various conditions to make sure input is valid.
    if (!preg_match('/^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\\.[a-zA-Z.]{2,5}$/', $_POST['Email'])) {
        echo "Invalid E-mail entered. E-mail must be in the format \"name@server.com\"<br />";
    }
    //Company is not in the database.
    if (count(my_trusted_mysql_query("SELECT Email FROM COMPANY WHERE Email = '{$q['Email']}'")) == 0) {
        echo "The company with the e-mail " . $q['Email'] . " does not exist in the database. " . "To add this company's information, please select insert instead of update.<br /><br />";
        $_POST['Fill'] = 'true';
    } else {
        echo "All events hosted by the company with e-mail " . $q['Email'] . ": <br />";
        display_results(my_trusted_mysql_query("SELECT * FROM EVENT WHERE Event_ID IN (SELECT Event_ID FROM HOSTS WHERE Email='{$q['Email']}')"));
        my_mysql_close();
        $_POST['Fill'] = 'false';
    }
}
?>
          </div>
          <div class="style35">
            <ul>
              <strong>View all classes or screenings hosted by a specific company:</strong><br />
              <li>The company must already be in the database.</li>
            </ul>
          </div>

<!-- The HTML for receiving user input from text boxes and such -->
<!-- For proper HTML rendering, the php scripts must be left completely left-aligned! -->
                        my_mysql_close();
                        $_POST['Fill'] = 'false';
                    }
                } else {
                    if ($_POST['query_type'] == 'delete') {
                        //Person is not in the database.
                        if (count(my_trusted_mysql_query("SELECT Email FROM SCREEN_PARTICIPANT WHERE Email = '{$q['Email']}'")) == 0) {
                            echo "The person with the e-mail " . $q['Email'] . " is not currently in the database as a screening participant. " . "To add this person's information, please select insert.<br /><br />";
                            $_POST['Fill'] = 'true';
                        } else {
                            //Show the record that's about to be deleted.
                            echo "Records deleted:";
                            display_results(my_trusted_mysql_query("SELECT * FROM SCREEN_PARTICIPANT WHERE Email = '{$q['Email']}'"));
                            display_results(my_trusted_mysql_query("SELECT * FROM S_ATTEND WHERE Email = '{$q['Email']}'"));
                            $query = "DELETE FROM SCREEN_PARTICIPANT WHERE Email='{$q['Email']}'";
                            my_trusted_mysql_query($query);
                            my_mysql_close();
                            $_POST['Fill'] = 'false';
                        }
                    } else {
                        echo "An unexpected selection has been made. <br />";
                        my_mysql_close();
                        die;
                    }
                }
            }
        }
    }
}
?>
          </div>
<html>
<title>
Company Test
</title>
<body>

<!-- The php script for generating the table and handling database queries -->
<?php 
include "includes/functions.php";
my_mysql_connect();
echo "<h1><CENTER>Class</CENTER></h1>";
//Displays the total people at each class
display_results(my_trusted_mysql_query("SELECT Event_ID, count(Email) FROM C_ATTEND GROUP BY Event_ID"));
echo "<h1><CENTER>Session</CENTER></h1>";
//Displays the total people at each Session
display_results(my_trusted_mysql_query("SELECT Event_ID, count(Email) FROM S_ATTEND GROUP BY Event_ID"));
my_mysql_close();
?>


</body>
</html> 
                        echo "<br />Company's association by hosting this event:<br />";
                        display_results(my_trusted_mysql_query("SELECT * FROM COMPANY WHERE Email IN (SELECT Email FROM HOSTS WHERE Event_ID={$Event_ID_num})"));
                        //display_results(my_trusted_mysql_query( "SELECT Event_ID, Email FROM HOSTS WHERE Event_ID = $Event_ID_num" ));
                        //display_results(my_trusted_mysql_query( "SELECT Event_ID, Email FROM S_ATTEND WHERE Event_ID = $Event_ID_num" ));
                        //display_results(my_trusted_mysql_query( "SELECT Event_ID, Email FROM C_ATTEND WHERE Event_ID = $Event_ID_num" ));
                        echo "<br />People attending this event:<br />";
                        display_results(my_trusted_mysql_query("SELECT * FROM SCREEN_PARTICIPANT WHERE Email IN (SELECT Email FROM S_ATTEND WHERE Event_ID={$Event_ID_num})"));
                        display_results(my_trusted_mysql_query("SELECT * FROM CLASS_PARTICIPANT WHERE Email IN (SELECT Email FROM C_ATTEND WHERE Event_ID={$Event_ID_num})"));
                        my_trusted_mysql_query("DELETE FROM EVENT WHERE Event_ID={$Event_ID_num}");
                        my_trusted_mysql_query("DELETE FROM LOCATION WHERE Event_ID={$Event_ID_num}");
                        my_trusted_mysql_query("DELETE FROM CLASS_DATES WHERE Event_ID={$Event_ID_num}");
                        my_trusted_mysql_query("DELETE FROM HOSTS WHERE Event_ID={$Event_ID_num}");
                        my_trusted_mysql_query("DELETE FROM CLASS_PARTICIPANT WHERE Email IN (SELECT Email FROM C_ATTEND WHERE Event_ID={$Event_ID_num})");
                        my_trusted_mysql_query("DELETE FROM SCREEN_PARTICIPANT WHERE Email IN (SELECT Email FROM S_ATTEND WHERE Event_ID={$Event_ID_num})");
                        my_trusted_mysql_query("DELETE FROM C_ATTEND WHERE Event_ID = {$Event_ID_num}");
                        my_trusted_mysql_query("DELETE FROM S_ATTEND WHERE Event_ID = {$Event_ID_num}");
                        my_mysql_close();
                        $_POST['Fill'] = 'false';
                    }
                }
            } else {
                echo "An unexpected selection has been made. <br />";
                my_mysql_close();
                die;
            }
        }
    }
}
?>
          </div>
    $Event_ID_num = (int) $q['Event_ID'];
    my_mysql_connect();
    //event ID can't be blank
    if ($Event_ID_num == 0) {
        echo "Invalid Event ID entered. Event ID cannot be blank and must be a number. <br />";
    } else {
        if (count(my_trusted_mysql_query("SELECT Event_ID FROM EVENT WHERE Event_ID = {$Event_ID_num}")) == 0) {
            echo "The event with the ID " . $q['Event_ID'] . " does not exist in the database. " . "<br />To add this event's information, please go <a href='http://group13.x10hosting.com/event_manip.php'>[here]</a> and select insert.<br /><br />";
            $_POST['Fill'] = 'true';
        } else {
            echo "People administering or teaching the event: <br />";
            display_results(my_trusted_mysql_query("SELECT * FROM STAFF WHERE Email IN (SELECT Email FROM ADMINISTER WHERE Event_ID={$Event_ID_num})"));
            display_results(my_trusted_mysql_query("SELECT * FROM STAFF WHERE Email IN (SELECT Email FROM TEACH WHERE Event_ID={$Event_ID_num})"));
            echo "<br />People attending the event: <br />";
            display_results(my_trusted_mysql_query("SELECT * FROM CLASS_PARTICIPANT WHERE Email IN (SELECT Email FROM C_ATTEND WHERE Event_ID={$Event_ID_num})"));
            display_results(my_trusted_mysql_query("SELECT * FROM SCREEN_PARTICIPANT WHERE Email IN (SELECT Email FROM S_ATTEND WHERE Event_ID={$Event_ID_num})"));
            my_mysql_close();
            $_POST['Fill'] = 'false';
        }
    }
}
?>
          </div>
          <div class="style35">
            <ul>
              <strong>
                View all participants who are attending a
                specific class or screening:</strong><br />
              <li>The event ID must already be in the database.</li>
            </ul>
          </div>
<html>
<title>
Company Test
</title>
<body>

<!-- The php script for generating the table and handling database queries -->
<?php 
include "includes/functions.php";
my_mysql_connect();
echo "<h1><CENTER>Class</CENTER></h1>";
//Displays the class with the most amount of people
display_results(my_trusted_mysql_query("SELECT Event_ID, min(people) FROM ( SELECT Event_ID, count(Email) people FROM C_ATTEND GROUP BY Event_ID) AS cnt_table"));
echo "<h1><CENTER>Session</CENTER></h1>";
//Displays the session with the most amount of people
display_results(my_trusted_mysql_query("SELECT Event_ID, min(people) FROM ( SELECT Event_ID, count(Email) people FROM S_ATTEND GROUP BY Event_ID) AS cnt_table"));
my_mysql_close();
?>


</body>
</html> 
my_mysql_connect();
echo "<br />Staff list: ";
$results_staff = my_trusted_mysql_query("SELECT * FROM STAFF");
display_results($results_staff);
echo "<br />Number of Staff: ";
$total_staff = count(my_trusted_mysql_query("SELECT * FROM STAFF"));
echo "{$total_staff}<br />";
echo "<br />Screening participant list: ";
display_results(my_trusted_mysql_query("SELECT * FROM SCREEN_PARTICIPANT"));
echo "<br />Number of screening participants: ";
$total_screening = count(my_trusted_mysql_query("SELECT * FROM SCREEN_PARTICIPANT"));
echo "{$total_screening}<br />";
echo "<br />Class participant list: ";
display_results(my_trusted_mysql_query("SELECT * FROM CLASS_PARTICIPANT"));
echo "<br />Number of class participants: ";
$total_class = count(my_trusted_mysql_query("SELECT * FROM CLASS_PARTICIPANT"));
echo "{$total_class}";
my_mysql_close();
?>

         <br /><br />   
         </td>
      </tr>
      <tr>
        <td colspan="2"><table align="left" border="1" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td height="38" background="/images/index_r17_c9.jpg" class="style21">
        <div align="center">Patents and Copyrights owned by Maelstrom, Not for use by others</span><strong>.</strong><br>
        </div></td>
  </tr>
</table>
          </tr>



        </table></td>

        <td align="left" width="100%" style="background-color: #FFFFFF" class="style26">

         <center>Current companies in the database:<br /><br /></center>

<?php 
include "includes/functions.php";
//Connect to the database
my_mysql_connect();
display_results(my_trusted_mysql_query("SELECT * FROM COMPANY"));
$total_company = count(my_trusted_mysql_query("SELECT * FROM COMPANY"));
echo "<br />Total Companies: ";
echo "{$total_company}";
my_mysql_close();
?>

         <br /><br />   

         </td>

      </tr>

      <tr>

        <td colspan="2"><table align="left" border="1" cellpadding="0" cellspacing="0" width="100%">
//Connect to the database
my_mysql_connect();
//Delete all previous records in company table.
my_trusted_mysql_query("DELETE FROM COMPANY");
my_trusted_mysql_query("DELETE FROM EVENT");
my_trusted_mysql_query("DELETE FROM CLASS_PARTICIPANT");
my_trusted_mysql_query("DELETE FROM SCREEN_PARTICIPANT");
my_trusted_mysql_query("DELETE FROM STAFF");
my_trusted_mysql_query("DELETE FROM C_ATTEND");
my_trusted_mysql_query("DELETE FROM S_ATTEND");
//The array that stores each INSERT query as an element.
//Can run through them in a loop later, easy-peasy
$population = array("INSERT INTO COMPANY (Email, Name, Address, City, State, Zip)\r\nVALUES ('*****@*****.**', 'Maelstrom', '321 Money Ln', 'Rolla', 'MO', 64014)", "INSERT INTO COMPANY (Email, Name, Address, City, State, Zip)\r\nVALUES ('*****@*****.**', 'Mage_Killer', '456 Rock Face Rd', 'Middle-earth', 'TX', 22215)", "INSERT INTO COMPANY (Email, Name, Address, City, State, Zip)\r\nVALUES ('*****@*****.**', 'br?', 'Dirt Road', 'Brazil', 'BR', 11111)", "INSERT INTO COMPANY (Email, Name, Address, City, State, Zip)\r\nVALUES ('*****@*****.**', 'Efsie', 'Rich Pl', 'Gojira', 'JP', 01235)", "INSERT INTO STAFF (Fname, Lname, Email, Address, City, State, Zip, Comments, Password)\r\nVALUES ( 'James', 'Bond', '*****@*****.**', '1803 awesome Rd', 'Rolla', 'MO', 65401, NULL, 12345)", "INSERT INTO STAFF (Fname, Lname, Email, Address, City, State, Zip, Comments, Password)\r\nVALUES ( 'Frank', 'Sims', '*****@*****.**', 'Ice cap', 'North Pole', 'NP', 71374, NULL, 123123)", "INSERT INTO SCREEN_PARTICIPANT (Email, Fname, Lname, Address, City, State, Zip, Comments, Time)\r\nVALUES ('*****@*****.**', 'Pope', 'Joe', '123 Holy Rd', 'Vatican', 'Vatican', 77777, NULL, 7 )", "INSERT INTO CLASS_PARTICIPANT (Email, Fname, Lname, Address, City, State, Zip, Comments, BCBSNum, BCBSSuffix, Birth_Date)\r\nVALUES ('*****@*****.**', 'Peter', 'Parker', '20 Ingram Street', 'Queens', 'NY', 11428, 'AKA spiderman', 7, 8, '4/3/1962' )", "INSERT INTO EVENT (EVENT_ID, Event_Name, Start_Date, End_Date, Start_Time, End_Time, Comments, E_Type, S_Type, Session_Length)\r\nVALUES (101,'Health Fair', 6, 9, 7, 8, NULL, 's', 'Fair', 15 )", "INSERT INTO EVENT (EVENT_ID, Event_Name, Start_Date, End_Date, Start_Time, End_Time, Comments, E_Type, S_Type, Session_Length)\r\nVALUES (102,'Quit Smoking', 6, 9, 7, 8, NULL, 'c', NULL, NULL )", "INSERT INTO C_ATTEND (Email, Event_ID)\r\nVALUES ('*****@*****.**', 102)", "INSERT INTO S_ATTEND (Email, Event_ID)\r\nVALUES ('*****@*****.**', 101)");
//Perform the queries, huzzah
foreach ($population as $query) {
    echo "> " . $query . "<br />";
    my_trusted_mysql_query($query);
}
//Confirm the insertions
display_results(my_trusted_mysql_query("SELECT * FROM COMPANY"));
display_results(my_trusted_mysql_query("SELECT * FROM EVENT"));
display_results(my_trusted_mysql_query("SELECT * FROM CLASS_PARTICIPANT"));
display_results(my_trusted_mysql_query("SELECT * FROM SCREEN_PARTICIPANT"));
display_results(my_trusted_mysql_query("SELECT * FROM STAFF"));
display_results(my_trusted_mysql_query("SELECT * FROM C_ATTEND"));
display_results(my_trusted_mysql_query("SELECT * FROM S_ATTEND"));
//Close connection to database
my_mysql_close();
?>
 
</td>
          </tr>

        </table></td>
        <td align="left" width="100%" style="background-color: #FFFFFF" class="style26">
         <center>Current screenings in the database:<br /><br /></center>
         <?php 
include "includes/functions.php";
my_mysql_connect();
display_results(my_trusted_mysql_query("SELECT Event_ID, Event_Name, Start_Date, End_Date, Start_Time, End_Time, Comments, S_Type, Session_Length FROM EVENT WHERE E_Type = 's'"));
$total_screening = count(my_trusted_mysql_query("SELECT * FROM EVENT WHERE E_Type = 's'"));
echo "<br />Total screenings: ";
echo "{$total_screening}";
echo "<br />Average number of people per screening: ";
//Displays the avrage number of people attending all screening
display_results(my_trusted_mysql_query("SELECT AVG(Screening_Participants) FROM ( SELECT Event_ID, count(Email) Screening_Participants FROM S_ATTEND GROUP BY Event_ID) AS cnt_table"));
my_mysql_close();
?>

         <br /><br />   
         </td>
      </tr>
      <tr>
        <td colspan="2"><table align="left" border="1" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td height="38" background="/images/index_r17_c9.jpg" class="style21">
        <div align="center">Patents and Copyrights owned by Maelstrom, Not for use by others</span><strong>.</strong><br>
        </div></td>
  </tr>
</table>
</td>
if (isset($_POST['submit'])) {
    //Copy $_POST data, sanitizing it to prevent SQL injection attacks.
    $q = safe_inputs($_POST);
    //Force event ID into a number
    $Event_ID_num = (int) $q['Event_ID'];
    my_mysql_connect();
    //event ID can't be blank
    if ($Event_ID_num == 0) {
        echo "Invalid Event ID entered. Event ID cannot be blank and must be a number. <br />";
    } else {
        if (count(my_trusted_mysql_query("SELECT Event_ID FROM EVENT WHERE Event_ID = {$Event_ID_num}")) == 0) {
            echo "The event with the ID " . $q['Event_ID'] . " does not exist in the database. " . "<br />To add this event's information, please go <a href='http://group13.x10hosting.com/event_manip.php'>[here]</a> and select insert.<br /><br />";
            $_POST['Fill'] = 'true';
        } else {
            echo "Dates and times for event {$Event_ID_num}: <br />";
            display_results(my_trusted_mysql_query("SELECT Event_ID, Event_Name, Start_Date, Start_Time, End_Date, End_Time FROM EVENT WHERE Event_ID={$Event_ID_num}"));
            my_mysql_close();
            $_POST['Fill'] = 'false';
        }
    }
}
?>
          </div>
          <div class="style35">
            <ul>
              <strong>View all times and dates associated with a specific class or screening:</strong><br />
              <li>The event ID must already be in the database.</li>
            </ul>
          </div>

<!-- The HTML for receiving user input from text boxes and such -->
예제 #15
0
<?php

include "includes/functions.php";
session_start();
// clean input values and copy them into a new array
$q = safe_inputs($_POST);
// connect to the database
my_mysql_connect();
$result = array();
$result = my_trusted_mysql_query("SELECT AccountNumber FROM Account WHERE UserName = '******'userName']}' AND Password = '******'password']}'");
$_SESSION["LoginErr"] = 1;
if (count($result) == 1) {
    //echo $result[0];
    $_SESSION["username"] = $_POST["userName"];
    $_SESSION["AcctNumber"] = $result[0]["AccountNumber"];
    // For the questionnaire results, '1' means a message will be displayed to
    // inform the user the storage went properly.
    $_SESSION["QuestionnaireFilled"] = 0;
    $result = my_trusted_mysql_query("SELECT Admin FROM Account WHERE UserName = '******'userName']}' AND Password = '******'password']}'");
    $_SESSION["adminLvl"] = $result[0]["Admin"];
}
my_mysql_close();
if (isset($_SESSION["AcctNumber"])) {
    $_SESSION["LoginErr"] = 0;
    header('Location: http://minersoft.org/gamewarp/');
} else {
    header('Location: http://minersoft.org/gamewarp/newaccount.php');
}
          </tr>

        </table></td>
        <td align="left" width="100%" style="background-color: #FFFFFF" class="style26">
         <center>Current classes in the database:<br /><br /></center>
<?php 
include "includes/functions.php";
//Connect to the database
my_mysql_connect();
display_results(my_trusted_mysql_query("SELECT Event_ID, Event_Name, Start_Date, End_Date, Start_Time, End_Time, Comments FROM EVENT WHERE E_Type = 'c'"));
$total_class = count(my_trusted_mysql_query("SELECT * FROM EVENT WHERE E_Type = 'c'"));
echo "<br />Total classes: ";
echo "{$total_class}";
echo "<br />Average number of people per class: ";
//Displays the avrage number of people attending all classes
display_results(my_trusted_mysql_query("SELECT AVG(Class_Attendees) FROM ( SELECT Event_ID, count(Email) Class_Attendees FROM C_ATTEND GROUP BY Event_ID) AS cnt_table"));
my_mysql_close();
?>

         <br /><br />   
         </td>
      </tr>
      <tr>
        <td colspan="2"><table align="left" border="1" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td height="38" background="/images/index_r17_c9.jpg" class="style21">
        <div align="center">Patents and Copyrights owned by Maelstrom, Not for use by others</span><strong>.</strong><br>
        </div></td>
  </tr>
</table>
</td>
                        }
                    } else {
                        if ($_POST['query_type'] == 'delete') {
                            //Company is not in the database.
                            if (count(my_trusted_mysql_query("SELECT Email FROM COMPANY WHERE Email = '{$q['Email']}'")) == 0) {
                                echo "The company with the e-mail " . $q['Email'] . " does not exist in the database. " . "To add this company's information, please select insert.<br /><br />";
                                $_POST['Fill'] = 'true';
                            } else {
                                //Show the record that's about to be deleted.
                                echo "Record deleted:";
                                display_results(my_trusted_mysql_query("SELECT * FROM COMPANY WHERE Email = '{$q['Email']}'"));
                                display_results(my_trusted_mysql_query("SELECT Email, Number FROM COMPANY_PHONE WHERE Email = '{$q['Email']}'"));
                                $company_query = "DELETE FROM COMPANY WHERE Email='{$q['Email']}'";
                                my_trusted_mysql_query($company_query);
                                $company_phone_query = "DELETE FROM COMPANY_PHONE WHERE Email='{$q['Email']}'";
                                my_trusted_mysql_query($company_phone_query);
                                my_mysql_close();
                                $_POST['Fill'] = 'false';
                            }
                        } else {
                            echo "An unexpected selection has been made. <br />";
                            my_mysql_close();
                            die;
                        }
                    }
                }
            }
        }
    }
}
?>
          </tr>



        </table></td>

        <td align="left" width="100%" style="background-color: #FFFFFF" class="style26">

         <center>Events currently in the database:<br /><br /></center>

<?php 
include "includes/functions.php";
//Connect to the database
my_mysql_connect();
display_results(my_trusted_mysql_query("SELECT * FROM EVENT"));
$total_event = count(my_trusted_mysql_query("SELECT * FROM EVENT"));
echo "<br />Total Events: ";
echo "{$total_event}";
my_mysql_close();
?>

         <br /><br />   

         </td>

      </tr>

      <tr>

        <td colspan="2"><table align="left" border="1" cellpadding="0" cellspacing="0" width="100%">