<%@ import java.sql.*; %>
<%

String username = "worrall";
String password = "h524b1";
String uri = "jdbc:mysql://jaguar.cis.udel.edu:8099/worrall";

%>

<html>
 <head><title>Find Free Time</title></head>
 <body>
  <h2>Find Free Times</h2>
  <a href="menu.html">Menu</a>
  <hr/>
  select 3 people
  <% //set up the connection
     Class.forName("org.gjt.mm.mysql.Driver").newInstance();
     mycon = DriverManager.getConnection(uri, username, password);
     mystmt = myCon.createStatement();
     
     ResultSet result = mystmt.executeQuery("SELECT * FROM users");
  %>
   <form>
    <input type="hidden" name="tag" value="2" />
    user 1
    <select name="user2">
    <% 
    while(result.next()){
        out.println("<option>" + result.getString("u") + "</option">);
    }
    %>
    
    </select>
    <br>
    user 2
    <select name="user3">
    </select>
    <br>
    user 3
    <select name="user4">
    </select>
    <br>

    restriction:<input type="text" name="restriction"><br>
    <input type="submit">  
   </form>
 </body>
</html>
