<%@ 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?

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









Related Tutorials/Questions & Answers:
please reply the code to store dynamic fields in database?
Generating dynamic fields in struts2
Advertisements
Please Reply - Java Beginners
PLease reply its urgent
Java Program(Please reply asap)
Javascript Code for all fields
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'
ModuleNotFoundError: No module named 'django-dynamic-form-fields'
ModuleNotFoundError: No module named 'drf-dynamic-fields'
ModuleNotFoundError: No module named 'drf_dynamic_fields_mixin'
store pagination form fields - Struts
store dynamic generated textbox value into database
ModuleNotFoundError: No module named 'odoo8-addon-sale-properties-dynamic-fields'
please provide the code
Would you know answer means please send reply urgent
struts problem ... need help urgently.. please reply ASAP
how to store dynamic array in hidden field in javascript?
Please provide the code
Please provide the code
Please provide the code
Please help with this code
Provide the code please
how to store a dynamic values - JSP-Servlet
please provide code - Java Beginners
How to populate text fields using php code?
could anyone please help with the code.
Please develop code - Development process
please reply fast if anyone knows that how to install mysql on windows using msi package
please send code - Java Beginners
ajax code please help to solve this........
databases
databases
databases
databases
databases
PLEASE Help me write a Java program which will store, manipulate, and print student registration information.
Jsp Code to store date in database - JSP-Servlet
Please help me fix this code - MobileApplications
java code to validate column content of 2 different tables in 2 different databases.
please help me to write a code for this program
please help me to write a code for this program
Please explain what is hibernatetemplate with an example code.
reply - Java Beginners
Please help me to modify my java code from php code
fields
Please tell me the code to generate the below structure
Please help me to write a code for add contacts to groups in a website?

Ads