html - Not able to fetch User details in JSP -


i'm fetching details based on email id wrote following code

<%         string patientid=request.getparameter("patientid");         preparedstatement pst = con.preparestatement("select email,patientname,patientid patient patientid='"+patientid+"'");         resultset rst= pst.executequery();         string email=null;         %>        <%while(rst.next()){            email = rst.getstring(1);        }%>           <% preparedstatement ps = conn.preparestatement("select weight, height, bp, sugarb4,sugaraftr,eyelow,eyehigh,chol,time measurements email='"+email+"'" );          resultset rss=ps.executequery();          %>          <%while(rss.next()){%>          <table>                                             <tr><td>weight</td><td><input type="text" value="<%=rss.getstring(1)%>" disabled/></td>                                             <td>height</td><td><input type="text" value="<%=rss.getstring(2)%>" disabled/></td></tr>                                             <tr><td>blood pressure</td><td><input type="text" value="<%=rss.getstring(3)%>" disabled/></td></tr>                                             <tr><td>sugar level before fasting</td><td><input type="text" value="<%=rss.getstring(4)%>" disabled/></td>                                             <td>sugar level after fasting</td><td><input type="text" value="<%=rss.getstring(5)%>" disabled/></td></tr>                                             <tr><td>eye power low vision</td><td><input type="text" value="<%=rss.getstring(6)%>" disabled/></td>                                             <td>eye power high vision</td><td><input type="text" value="<%=rss.getstring(7)%>" disabled/></td></tr>                                             <tr><td>cholesterol</td><td><input type="text" value="<%=rss.getstring(8)%>" disabled/></td></tr>                                             <tr><td>date absorbed</td><td><input type="text" value="<%=rss.getstring(9)%>" disabled/></td></tr>          <%}%>                                         </table> 

but not fetching details based on email. wrong in code please let me know


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -