Advertisement
Guest User

Untitled

a guest
Apr 5th, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 KB | None | 0 0
  1. <%
  2. Connection conn;
  3. try {
  4. Class.forName("com.mysql.jdbc.Driver");
  5. }
  6. catch (ClassNotFoundException e1)
  7. {
  8. // TODO Auto-generated catch block
  9. e1.printStackTrace();
  10. }
  11. try {
  12. String email = login.getEmail();
  13. System.out.println(email);
  14. Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/project", "root", "");
  15. Statement statement = connection.createStatement();
  16. ResultSet resultset = statement
  17. .executeQuery("SELECT * FROM test.work where EnjoyerID LIKE '%" + email + "%' ");
  18. %>
  19.  
  20. <%
  21. while (resultset.next()) {
  22. %>
  23. <%System.out.println(resultset.getString(1)); %>
  24. <div class="pin" id="<%=resultset.getString(1)%>">
  25. <p id="user"><a href="#">
  26. <span style="font-size:20px; text-decoration:none;">
  27. <!-- <i class="fa fa-user fa-lg"></i> -->
  28. <i class="fa fa-user fa-lg"></i>&nbsp &nbsp<%=resultset.getString(2) %>
  29. </span>
  30. </a></p>
  31.  
  32.  
  33.  
  34.  
  35.  
  36. <span class="containerslide">
  37. <div id="slides">
  38. <img src="workuploadpic/pic1/<%=resultset.getString(9) %>"/>
  39. <img src="workuploadpic/pic2/<%=resultset.getString(11)%>"/>
  40. <img src="workuploadpic/pic3/<%=resultset.getString(13)%>"/>
  41. <!-- <a href="#" class="slidesjs-previous slidesjs-navigation"><i class="icon-chevron-left"></i></a>
  42. <a href="#" class="slidesjs-next slidesjs-navigation"><i class="icon-chevron-right"></i></a> -->
  43. </div>
  44. </span>
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51. <div id="word">
  52. <p>
  53. <%=resultset.getString(5) %> - $<%=resultset.getString(7) %>
  54. <br>
  55. <%=resultset.getString(6) %>
  56. <br><br>
  57. <i class="fa fa-street-view fa-lg"></i> At: <%=resultset.getString(3) %>
  58. <br>
  59. <i class="fa fa-scissors fa-lg"></i> By: <%=resultset.getString(2) %>
  60. </p>
  61. </div>
  62. <br>
  63. <!----------------------------------------------------------------------
  64. ***********************************************************************
  65. Comment still now working
  66. ***********************************************************************
  67. ----------------------------------------------------------------------->
  68. <form class="comment" method="post" action="">
  69. <input type="hidden" name="id" value="1" />
  70. <textarea placeholder="Add a comment..." maxlength="1000"></textarea>
  71. <button type="button" class="button1" id="but">Comment</button>
  72. </form>
  73.  
  74. </div>
  75.  
  76. <%
  77. }
  78. } catch (Exception e) {
  79. e.printStackTrace();
  80. }
  81. %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement