Can anyone tell me how to solve this problem?
I am making a series of forms for an educational application.
I am able to insert data into a database ok. When I look into MySql the data
is all there but when I
repopulate the form from the database, the words are truncated as soon as it
encounters a space.
Here is a sample of my code:
// query statement
Statement stmt = con.createStatement();
String queryStr = "SELECT firstname,lastname FROM author";
ResultSet rs = stmt.executeQuery(queryStr);
while (rs.next()){
String firstname = rs.getString(1);
String lastname = rs.getString(2);
<!--Repopulate form from database -->
<FORM name=authorform action="saveauthor.jsp" >
<td>
<input name="firstname" size="30" value=<%= firstname%>>
<input name="lastname" size="30" value=<%= lastname%>>
Thank you,
Barb Johnson
Instructional Programmer
Northeast Ohio Universities College of Medicine
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html