<%@ page import ="javax.sql.*" %> <%@page contentType="text/html" pageEncoding="UTF-8"%> <title>Login Use" name="description">

please reply the code to store dynamic fields in database?

Ads
 

please reply the code to store dynamic fields in database?

<%@ page import ="java.sql.*" %> <%@ page import ="javax.sql.*" %> <%@page contentType="text/html" pageEncoding="UTF-8"%>

<title>Login User</title>

<%! Connection con;ResultSet rs;Statement st; String pid;%> <%

try { Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.getConnection("jdbc:mysql://localhost:3306/health_care", "root", "123");

st = con.createStatement();

pid=request.getParameter("pid"); System.out.println(pid); rs=st.executeQuery("select * from patient where userid='"+"pid"+"'");

Boolean t=rs.next(); System.out.println(t); System.out.println("hai"); System.out.println(request.getParameter("pid"));

System.out.println(rs.getString(3)); // System.out.println(rs.getString(4)); // System.out.println(rs.getString(5)); if(!t){ System.out.println("No result"); } else { do{ %>

<table>
        <tr>PATIENT DETAILS</tr><br>
        <tr><br>
        <td>Patient Name</td>
        <td><input type="text" name="pname" value="<%=rs.getString(3)%>"></td>
    </tr>

        <td>DOB</td>
                    <td><input type="text" name="pname" value="<%=rs.getString(4)%>"></td>
    </tr>
            <tr>
        <td>Sex</td>
        <td><input type="text" name=value="<%=rs.getString(5)%>"></td>
    </tr>
            <tr>
        <td>Address</td>
        <td><input type="text" name="ads"  value="<%=rs.getString(6)%>"></td>
    </tr>
            <tr>
        <td>State</td>
        <td><input type="text" name="stt" value="<%=rs.getString(7)%>"></td>
    </tr>
            <tr>
        <td>Pincode</td>
        <td><input type="text" name="pn" value="<%=rs.getString(8)%>"></td>
    </tr> 

            <tr>
        <td>Mobile</td>
        <td><input type="text" name="mob" value="<%=rs.getString(9)%>"></td>
    </tr></td>
    </tr>
            <tr>
        <td>Landline</td>
        <td><input type="text" name="lnd" value="<%=rs.getString(10)%>" ></td>
    </tr>
    </table>

<% }while(rs.next()); }

}

catch(Exception e){} %>

View Answers

Ads









Related Tutorials/Questions & Answers:
please reply the code to store dynamic fields in database?
PLease reply its urgent
Advertisements
Generating dynamic fields in struts2
Java Program(Please reply asap)
Javascript Code for all fields
ModuleNotFoundError: No module named 'django-dynamic-form-fields'
ModuleNotFoundError: No module named 'drf-dynamic-fields'
ModuleNotFoundError: No module named 'drf_dynamic_fields_mixin'
ModuleNotFoundError: No module named 'drf-dynamic-fields'
ModuleNotFoundError: No module named 'drf_dynamic_fields_mixin'
ModuleNotFoundError: No module named 'WTForms-Dynamic-Fields'
ModuleNotFoundError: No module named 'WTForms-Dynamic-Fields'
Would you know answer means please send reply urgent
struts problem ... need help urgently.. please reply ASAP
store dynamic generated textbox value into database
please provide the code
how to store dynamic array in hidden field in javascript?
Please provide the code
Please provide the code
Please provide the code
ModuleNotFoundError: No module named 'odoo8-addon-sale-properties-dynamic-fields'
Please help with this code
Provide the code please
could anyone please help with the code.
How to populate text fields using php code?
ajax code please help to solve this........
databases
databases
databases
databases
databases

Ads