Link to home
Start Free TrialLog in
Avatar of jhughes4
jhughes4

asked on

Select results from Database

Hopefully this is a simple question.  I’m working on a JSP page that will search a database and return the results based on the search.  After the results have been returned, I need to allow the user to select one of the results and then be directed to the appropriate page based on that selection.  I’ve been able to retrieve the resultSet and create a radio button beside each one, however I’m not sure how to pass the information of the result to the next page.  Please see the example code I’ve provided.  What do I need to change here?  Thanks




while (rs.next()) {
       
         String project = rs.getString(1);
         String testname = rs.getString(2);
         String testid = rs.getString(3);
         String description = rs.getString(4);
         %>

       <table border ="0" cellspacing="1" cellpadding = "1">
<input type = "radio"
name = "result"
value = testname
onClick="submit()" ><h1>Project Name: <%=project%>     , TestName:         <%=testname%> , Description: <%=description%></h1> <BR></input>
 
  <%
ASKER CERTIFIED SOLUTION
Avatar of aleksmeza
aleksmeza

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jhughes4
jhughes4

ASKER

On the next jsp page when I do request.getParameter( "result" )) it just returns testname as opposed to the value of testname.