1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Rep Power

    Unhappy Inserting data into a table

    Is it possible to write jsp code in the middle of the html to insert data from table in database into table on browser. I want to write it in the html as the data in the table are going to be active links to the next page.

    Something like:

    <% For n=1 to rs.count%>
    <href <% rs.next%>/href>

    If anyone can help me with the proper jsp code i'd really appreciate it, I need help urgently....
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Rep Power
    try something like this

    while (rs.next())
    out.println("<tr><td><a href=" + <%rs.field("1")%> + ">" + <%rs.field("1")%> + </a></td></tr>");

    I'm not 100% sure on the syntax. I usually use servlets but they are very similar.

IMN logo majestic logo threadwatch logo seochat tools logo