Guest User

Untitled

a guest
Aug 7th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. <?php
  2. $mysql_host='localhost';
  3. $mysql_user='root';
  4. $mysql_password='CAN'T KNOW MY PASWORD!!!1!';
  5.  
  6. mysql_connect($mysql_host,$mysql_user,$mysql_password);
  7. @mysql_select_db('galaxall');
  8. ?>
  9.  
  10. <style>
  11. .clap{
  12. background-color:red;
  13. }
  14.  
  15.  
  16.  
  17.  
  18.  
  19. </style>
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26. <p style="background-color:rgb(2,2,2)">
  27. <div style="background-color:rgb(250,250,250);padding-bottom:3%;margin-right:20%">
  28. <?php
  29. $hello='hello everybody!!! &nbsp;&nbsp;&nbsp;&nbsp;I'm d boss!';
  30. $img='<img src="b5.jpg">';
  31.  
  32.  
  33. $query="SELECT * FROM `comments` ";
  34. $results = mysql_num_rows($query);
  35.  
  36. echo $results;
  37.  
  38. if($is_query_run=mysql_query($query) )
  39. {
  40. $results = mysql_num_rows($is_query_run);
  41.  
  42. echo "Number of comments:<font style='font-weight:bold;'>$results".'<p style="font-weight:bold;" onclick="alert("hello")">'.'</font>';
  43.  
  44. while($query_execute=mysql_fetch_assoc($is_query_run) )
  45. {
  46.  
  47.  
  48. echo $query_execute ['Comment'].'<br>'.'<br>'.'<br>'."<a href='' class='clap'>.<img src='clap4.png' width='3%' height='3%'>.'&npsp;'.'&npsp;'.'&npsp;'.'&npsp;'.'&npsp;'
  49. .'Respond'</a>".'<p style="background-color:white;padding-bottom:1%;padding-left:3.5%;padding-top:1%;margin-left:0%;border:1px solid grey;border-radius:5%;box-shadow:2px 2px 2px #999;margin-right:25%; id="comment" >';
  50.  
  51.  
  52.  
  53.  
  54. }
  55.  
  56. }
  57.  
  58. else
  59. {
  60. echo"Sorry, something went wrong...";
  61. }
  62.  
  63. ?>
  64. </p>
  65.  
  66. <script>
  67.  
  68. var d = document.getElementsByClassName("clap");
  69.  
  70. var c = document.getElementById("comment");
  71.  
  72. function mouseOver() {
  73. d.style.backgroundColor = "red";
  74. }
  75.  
  76. function mouseOut() {
  77.  
  78. d.style.backgroundColor = "blue";
  79. }
  80.  
  81.  
  82.  
  83. c.onmouseover = mouseOver();
  84.  
  85.  
  86. c.onmouseout = mouseOut();
  87.  
  88.  
  89. </script>
  90.  
  91. 10:45:19.526 comments_gxx58.php:50 Uncaught TypeError: Cannot set property 'backgroundColor' of undefined
  92. at mouseOver (comments_gxx58.php:50)
  93. at comments_gxx58.php:60
Add Comment
Please, Sign In to add comment