Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header('Access-Control-Allow-Origin: http://myscripts.forumz.ro');
- $mysql = mysql_connect("localhost", "u719064522_bitcd", "5vEelfGVsC") or die(mysql_error());
- if(!$mysql)
- print("Conexiunea cu serverul a esuat !");
- $database = mysql_select_db("u719064522_stupd") or die(mysql_error());
- if(!$database)
- print("Conexiunea cu baza de date a esuat !");
- $query = "SELECT * FROM `likes` WHERE `PostID`=". $_GET['post_id'] ." ORDER BY `PostID` LIMIT 0, 30";
- $result = mysql_query($query);
- if(mysql_num_rows($result) > 0)
- {
- while($like_row = mysql_fetch_assoc($result))
- {
- if($_GET['post_id']) {
- if($_GET['post_id'] == $like_row['PostID'])
- {
- $likes = "<p class='post-". $like_row['PostID'] ."'>People like's this: ".$like_row['People']." (<strong>". $like_row['Count'] ." like's</strong>)</p>";
- echo $likes;
- }
- } else echo "No like this !";
- }
- } else $noLike = "No like's here"; echo $noLike;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement