Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $mysql_host='localhost';
- $mysql_user='root';
- $mysql_password='CAN'T KNOW MY PASWORD!!!1!';
- mysql_connect($mysql_host,$mysql_user,$mysql_password);
- @mysql_select_db('galaxall');
- ?>
- <style>
- .clap{
- background-color:red;
- }
- </style>
- <p style="background-color:rgb(2,2,2)">
- <div style="background-color:rgb(250,250,250);padding-bottom:3%;margin-right:20%">
- <?php
- $hello='hello everybody!!! I'm d boss!';
- $img='<img src="b5.jpg">';
- $query="SELECT * FROM `comments` ";
- $results = mysql_num_rows($query);
- echo $results;
- if($is_query_run=mysql_query($query) )
- {
- $results = mysql_num_rows($is_query_run);
- echo "Number of comments:<font style='font-weight:bold;'>$results".'<p style="font-weight:bold;" onclick="alert("hello")">'.'</font>';
- while($query_execute=mysql_fetch_assoc($is_query_run) )
- {
- echo $query_execute ['Comment'].'<br>'.'<br>'.'<br>'."<a href='' class='clap'>.<img src='clap4.png' width='3%' height='3%'>.'&npsp;'.'&npsp;'.'&npsp;'.'&npsp;'.'&npsp;'
- .'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" >';
- }
- }
- else
- {
- echo"Sorry, something went wrong...";
- }
- ?>
- </p>
- <script>
- var d = document.getElementsByClassName("clap");
- var c = document.getElementById("comment");
- function mouseOver() {
- d.style.backgroundColor = "red";
- }
- function mouseOut() {
- d.style.backgroundColor = "blue";
- }
- c.onmouseover = mouseOver();
- c.onmouseout = mouseOut();
- </script>
- 10:45:19.526 comments_gxx58.php:50 Uncaught TypeError: Cannot set property 'backgroundColor' of undefined
- at mouseOver (comments_gxx58.php:50)
- at comments_gxx58.php:60
Add Comment
Please, Sign In to add comment