Your IP : 216.73.216.40


Current Path : /var/www/html/venkat/aviral/aviral/
Upload File :
Current File : //var/www/html/venkat/aviral/aviral/home.php

<?php
include('db1.php');
include('session.php');

$button = '<div class="container"><form action="home.php"><button type="submit">Go Back</button></form></div>';

?>
<center>
<div>
<h1><i>Summer semester courses registration</i></h1>

</div>

<br>
<br>
<center> <h2>
<table>
<tr>
	<td>View selection</td>
	<td><form action="view.php"><button type="submit">View</button></form></td>
</tr>
<tr>
<?php
$id = addslashes($_SESSION['key']);
$query = $conn->prepare("select course_id from aviral_registered where student_id=:id");
$query->bindParam(':id', $id);
$query->execute();
// $rows = $query->rowCount();
$res = $query->fetchAll(PDO::FETCH_ASSOC);
//$rows = $res->num_rows;

// echo 'rows: ' . $row[0];

if (!$res) {
	echo '<td>Register courses</td><td><form action="register.php"><button type="submit">View</button></form></td>';
} else {
	echo '<td>Register courses</td><td><form action="view.php"><button type="submit">View</button></form></td>';
}

?>
</tr>
<tr>
	<td>Edit selection</td><td><form action="register.php"><button type="submit">View</button></form></td>
</tr>
</table>
</center>