Advertisement
Guest User

Untitled

a guest
Jun 5th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement