<?php $profs = get_distinct('name', $con); $num_profs = mysql_num_rows($profs); echo "<h3>{$num_profs} Professors</h3>"; $num = 0; $schools = get_distinct('school', $con); $num_schools = mysql_num_rows($schools); echo "<h3>{$num_schools} Universities </h3>"; echo "<ul>"; while (($result = mysql_fetch_array($schools)) && $num <= $max) { echo "<li>{$result['school']}</li>"; $num += 1; } echo "</ul>"; $departments = get_distinct('department', $con); $num_depts = mysql_num_rows($departments); echo "<h3>{$num_depts} Departments <small>including</small></h3>"; ?> <ul> <li>Biology</li> <li>Chemical Engineering</li> <li>Civil Engineering</li> <li>Computer Science</li> <li>Economics</li> <li>English</li> <li>Mathematics </li> <li>Mechanical Engineering</li> <li>Medicine</li> <li>Psychiatry</li> <li>Physics</li>
<?php session_start(); include 'util.php'; $con = get_con(); if (!isset($_SESSION['user_id'])) { $_SESSION['user_id'] = new_anon_user($con); } $schools = get_distinct('school', $con); $num_schools = mysql_num_rows($schools); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Re:search</title> <meta name="description" content="Search for professors by research interest"> <meta name="author" content="Leah Alpert, Russell Cohen, Ram Bhaskar"> <!-- styles --> <link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css"> <link rel="stylesheet" href="my_css.css"> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/redmond/jquery-ui.css"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"> </script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.2/jquery-ui.min.js"> </script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.2/jquery-ui.min.js"></script> <script type="text/javascript" src="js/autocomplete.js"></script> <script type="text/javascript" src="js/index.js"></script> <script type="text/javascript" src="js/bootstrap-alerts.js"></script>