SHARE
TWEET

Untitled

a guest Jun 17th, 2019 106 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     $username = "root";
  3.     $password = "password";
  4.     $database = "xxxxxx";
  5.     $link = mysql_connect("localhost", $username, $password);    
  6.      $query = "SELECT rollno FROM users where username = '".$_SESSION['MM_Username']."'";
  7.     mysql_select_db('xxxxxx', $link);
  8.      $result = mysql_query($query) or die(mysql_error($link));
  9.      $num = mysql_num_rows($result);
  10.      mysql_close();
  11.  
  12.   $rows = array();
  13.  
  14.   $result = mysql_query($query) or die(mysql_error());
  15.   $rows = array();
  16.   while($r = mysql_fetch_row($result))
  17.   {
  18.    $rows[] = $r[0];
  19.    }
  20.    print_r($rows);
  21.    ?>
  22.      
  23. <?php
  24.     $username = "root";
  25.     $password = "password";
  26.     $database = "xxxx";
  27.     $link = mysql_connect("localhost", $username, $password);
  28.     mysql_select_db('xxxx', $link);
  29.  
  30.     $query = "SELECT rollno FROM users where username = '".$_SESSION['MM_Username']."'";
  31.     $result = mysql_query($query) or die(mysql_error($link));
  32.     $num = mysql_num_rows($result);
  33.  
  34.     $rows = array();
  35.     $result = mysql_query($query) or die(mysql_error());
  36.     $rows = array();
  37.     while($r = mysql_fetch_row($result))
  38.     {
  39.         $rows[] = $r[0];
  40.     }
  41.  
  42.     print_r($rows);
  43.     mysql_close();
  44.    ?>
  45.      
  46. mysql_close();
  47.      
  48. $result = mysql_query($query) or die(mysql_error());
  49.   $rows = array();
  50.      
  51. <?php
  52.     $username = "root";
  53.     $password = "password";
  54.     $database = "xxxxxx";
  55.     $link = mysql_connect("localhost", $username, $password);    
  56.      $query = "SELECT rollno FROM users where username = '".$_SESSION['MM_Username']."'";
  57.     mysql_select_db($database, $link);
  58.      $result = mysql_query($query) or die(mysql_error($link));
  59.      $num = mysql_num_rows($result);
  60.  
  61.   $rows = array();
  62.  
  63.   $result = mysql_query($query) or die(mysql_error());
  64.   $rows = array();
  65.   while($r = mysql_fetch_row($result))
  66.   {
  67.    $rows[] = $r[0];
  68.    }
  69.    print_r($rows);
  70.    mysql_close();
  71.    ?>
  72.      
  73. <?php
  74.     $username = "root";
  75.     $password = "password";
  76.     $database = "dfsdftwsdgdfgdfsgsdf";
  77.     $link = mysql_connect("localhost", $username, $password);    
  78.      $query = "SELECT rollno FROM users where username = '".$_SESSION['MM_Username']."'";
  79.     mysql_select_db('xxxxxxx', $link);
  80.      $result = mysql_query($query) or die(mysql_error($link));
  81.      $num = mysql_num_rows($result);
  82.  
  83.  
  84.   $rows = array();
  85.  
  86.   $result = mysql_query($query) or die(mysql_error());
  87.   $rows = array();
  88.   while($r = mysql_fetch_row($result))
  89.   {
  90.    $rows[] = $r[0];
  91.    }
  92.   mysql_close();
  93.    print_r($rows);
  94.    ?>
  95.      
  96. mysql_select_db('meipolytechnic', $link);
  97.  
  98.  
  99. $query = "SELECT rollno FROM users where username = '".$_SESSION['MM_Username']."'";
  100.     mysql_select_db('meipolytechnic', $link);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top