php/dashboard.php
#query to display a list of people going to a certain event (officers only)
query to display a list of people going to a certain event (officers only)
query to display a list of people going to a certain event ( officers only )
function displaySignups($connect, $EventID) {
	$result = mysqli_query($connect, "select Name from Events where EventID = $EventID");
	$EventName = $result->fetch_row();
	$result->free();
	$result = mysqli_query($connect, "select count(Username) from Going where EventID = $EventID");
	$numSigned = $result->fetch_row();
	$result->free();
	print"
	<h3><center>There are $numSigned[0] people signed up for $EventName[0].</center></h3>
	<table align = 'center' border = '1' width = 80%>
	<tr>
	<th>First Name</th>
	<th>Last Name</th>
	<th>E-mail</th>
	<th>Phone Number</th>
	</tr>";
	$going = "
	SELECT FName, LName, Email, Phone 
	FROM Users
	WHERE Username in (SELECT Username FROM Going WHERE EventID = $EventID)";
	$result = mysqli_query($connect, $going);
	while ($row = $result->fetch_row())
	{	
		print"
		<tr>
		<td>".$row[0]."</td>
		<td>".$row[1]."</td>
		<td>".$row[2]."</td>
		<td>".$row[3]."</td>
		</tr>";
	}
	$result->free();	
	print"
	</table>
	<br/><br/>";
}
function displaySignups ( $ connect , $ EventID ) { $ result = mysqli_query ( $ connect , " select Name from Events where EventID =  $ EventID " ) ; $ EventName = $ result -> fetch_row ( ) ; $ result -> free ( ) ; $ result = mysqli_query ( $ connect , " select count(Username) from Going where EventID =  $ EventID " ) ; $ numSigned = $ result -> fetch_row ( ) ; $ result -> free ( ) ; print " 
	<h3><center>There are  $ numSigned [ 0 ]  people signed up for  $ EventName [ 0 ] .</center></h3>
	<table align = 'center' border = '1' width = 80%>
	<tr>
	<th>First Name</th>
	<th>Last Name</th>
	<th>E-mail</th>
	<th>Phone Number</th>
	</tr> " ; $ going = " 
	SELECT FName, LName, Email, Phone 
	FROM Users
	WHERE Username in (SELECT Username FROM Going WHERE EventID =  $ EventID ) " ; $ result = mysqli_query ( $ connect , $ going ) ; while ( $ row = $ result -> fetch_row ( ) ) { print " 
		<tr>
		<td> " . $ row [ 0 ] . " </td>
		<td> " . $ row [ 1 ] . " </td>
		<td> " . $ row [ 2 ] . " </td>
		<td> " . $ row [ 3 ] . " </td>
		</tr> " ; } $ result -> free ( ) ; print " 
	</table>
	<br/><br/> " ; }
query to display a list of people going to a certain event (officers only)
query to display a list of people going to a certain event ( officers only )