Since you are using radio buttons you can change how you retrieve the valu from "type=req.getParameterValues("teachorstu")" to "type=req.getParameter("teachorstu"). i.e only one value can be sent to the servlet. Also you may want to change if(type=="teacher") to if(type.equals("teacher")) Put your code in the doPost method
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Remember that servlets are multithreaded. Using instance variables like this allows multiple requests to interfere with each other. Move these variable declarations inside your doGet() or doPost() method. ------------------ Phil Hanna Sun Certified Programmer for the Java 2 Platform Author of : JSP: The Complete Reference Instant Java Servlets Website: http://www.philhanna.com
Phil Hanna<BR>Sun Certified Programmer for the Java 2 Platform<BR>Author of :<BR><A HREF="http://www.amazon.com/exec/obidos/ASIN/0072127686/electricporkchop/107-3548162-1137317" TARGET=_blank rel="nofollow">JSP: The Complete Reference</A><BR><A HREF="http://www.amazon.com/exec/obidos/ASIN/0072124253/electricporkchop/107-3548162-1137317" TARGET=_blank rel="nofollow">Instant Java Servlets</A>
"yoop", The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements. Thanks.