daily pastebin goal
45%
SHARE
TWEET

Untitled

a guest Jun 5th, 2017 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function RetreiveLicense($userid, $product)
  2. {
  3. $server = 'localhost';
  4. $username = 'xxxxxxxxxxx';
  5. $password = 'xxxxxxxxxxxxxxxxxxx';
  6. $database = 'xxxxxxxxxxxxxxxx';
  7.     $con = mysql_connect($server,$username,$password);
  8.     mysql_select_db($database, $con);
  9.  
  10.    
  11.     $command = "SELECT Licence_No FROM vill_licences WHERE UserID=$userid and Application_No='$product' limit 1";
  12.     $result = mysql_query($command);
  13.     echo mysql_error($con);
  14.     if(mysql_num_rows($result) == 0)
  15.     {
  16.         echo mysql_error($con);
  17.         return "";
  18.     }
  19.     else
  20.     {
  21.         echo mysql_error($con);
  22.         mysql_result($result,0);
  23.     }
  24. }
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