<?php 
include("class_lib.php");

/*    establish connection with database  */ 
$sql = "select * from class";
$result = mysql_query($sql, $db_handle); 
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html> 
<head> 
<title>Class Website Login</title> 
 <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> 
 

<link href="<?php echo $dir ?>new_default.css" rel="stylesheet" type="text/css" /> 
</head> 
<body> 
<table class="bigframe" cellpadding="0" cellspacing="0" border="0"> 
<tr><td><img src="<?php echo $dir ?>images/banner.jpg" width="698" height="100" alt="CS Class Banner" /></td></tr> 

<form action="class_initialpage.php" method="<?php echo $request_style ?>"> 
<table class="content"> 
<tr><td><h3>Class Login</h3></td></tr> 
<tr><td>Username: <input type="text" name="user" /></td><tr><td>Password: <input type="password" name="password" /></td></tr> 
<tr><td>&nbsp;</td></tr> 

<tr><td><input type="submit" value="Login" /></td> 
<?php if ($_REQUEST['message']) print "<td><b>{$_REQUEST['message']}</b></td>"; ?>
<td><b> </b></td></tr>
<tr><td>
<select name="class">

<?php
while ($row_ref = mysql_fetch_assoc($result)) 
{ 
  print '<option value="'.$row_ref["id"].'"'; 
  print "> ".$row_ref["name"]." - ".$row_ref["num"]; 
  print "</option>"; 
} 
?>
</td></tr></select> 
</table> 
</form> 
<tr><td> 

</table> 
</body> 
</html> 

<?php mysql_close($db_handle);  ?> 


