Advertisement
Guest User

Untitled

a guest
Jul 12th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.98 KB | None | 0 0
  1. <?php
  2. session_start();
  3. ?>
  4. <html>
  5. <head>
  6. <meta http-equiv="refresh" content="1" />
  7. </head>
  8. <?php
  9. $username="changeme";
  10. $password="changeme";
  11. $database="changeme";
  12.  
  13.             $dbc = mysql_connect(localhost,$username,$password);
  14.             if (!$dbc) {
  15.              die (mysql_error());
  16.             }
  17.             $db = mysql_select_db($database);
  18.             if (!$db) {
  19.             die( "Unable to select database");}
  20.            
  21.                         $sql3 = "SELECT * FROM `request` WHERE `status` = '3'";
  22.                         $res3 = mysql_query($sql3) or die(mysql_error());
  23.                         $row1 = mysql_fetch_assoc($res3);
  24.                        
  25.                         if(!isset($_SESSION['sang'])) {
  26.                             $_SESSION['sang'] = $row1['url'];
  27.                        
  28.                         }else{
  29.  
  30.                         if($_SESSION['sang'] != $row1['url']){
  31.                            
  32.                            
  33.                             ?>
  34.                        
  35.                             <script type='text/javascript'>
  36.                              
  37.                                 my_window = window.open ("<?php echo $row1['url'];?>","Spotify");
  38.  
  39.                        
  40.  
  41.                             </script>
  42.                            
  43.                            
  44.                         <?php
  45.                         $_SESSION['sang'] = $row1['url'];
  46.                         }
  47.                        
  48.                         }
  49.  
  50. ?>
  51.  
  52. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement