php/dashboard.php
#shows events the user has signed up for in tabular form
shows events the user has signed up for in tabular form
shows events the user has signed up for in tabular form
function displayGoing($connect, $username) {
	$script = $_SERVER['PHP_SELF'];
	print"
	<h3><center>Events you're signed up for </center></h3>
	<form action = '$script' method = 'post'>
	<table align = 'center' border = '1' width = 80%>
	<tr>
	<th>Event ID</th>
	<th>Event Name</th>
	<th>Date</th>
	<th>Start Time</th>
	<th>End Time</th>
	<th>Location</th>
	</tr>";
	$going = "
	SELECT Events.EventID, Events.Name, Events.EventDate, Events.StartTime, Events.EndTime, Events.Location
	FROM Going INNER JOIN Events ON Going.EventID = Events.EventID
	WHERE Username = '".$username."'";
	$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>
		<td>".$row[4]."</td>
		<td>".$row[5]."</td>
		</tr>";
	}
	$result->free();	
	print"
	</table>
	</form>	
	<br/><br/>";
}
function displayGoing ( $ connect , $ username ) { $ script = $ _SERVER [ 'PHP_SELF' ] ; print " 
	<h3><center>Events you're signed up for </center></h3>
	<form action = ' $ script ' method = 'post'>
	<table align = 'center' border = '1' width = 80%>
	<tr>
	<th>Event ID</th>
	<th>Event Name</th>
	<th>Date</th>
	<th>Start Time</th>
	<th>End Time</th>
	<th>Location</th>
	</tr> " ; $ going = " 
	SELECT Events.EventID, Events.Name, Events.EventDate, Events.StartTime, Events.EndTime, Events.Location
	FROM Going INNER JOIN Events ON Going.EventID = Events.EventID
	WHERE Username = ' " . $ username . " ' " ; $ 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>
		<td> " . $ row [ 4 ] . " </td>
		<td> " . $ row [ 5 ] . " </td>
		</tr> " ; } $ result -> free ( ) ; print " 
	</table>
	</form>	
	<br/><br/> " ; }
shows events the user has signed up for in tabular form
shows events the user has signed up for in tabular form