Advertisement
Guest User

Untitled

a guest
Oct 11th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. <?php
  2. $dbname = "mugunth1_udid";
  3. $user = "mugunth1_udid";
  4. $password = "wrong password";
  5.  
  6. header('Content-Type: text/plain');
  7. $prod = $_POST['productid'];
  8. $udid = $_POST['udid'];
  9.  
  10. // Connect to database server
  11. $hd = mysql_connect("localhost", $user, $password)
  12. or die ("Unable to connect");
  13.  
  14. // Select database
  15.  
  16. mysql_select_db ($dbname, $hd)
  17. or die ("Unable to select database");
  18.  
  19. // Execute sample query (insert it into mksync all data in customer table)
  20.  
  21. $res = mysql_query("SELECT * FROM mugunth1_udid.requests where udid='$udid' AND productid='$prod' AND status = 1",$hd) or die ("Unable to select :-(");
  22.  
  23.  
  24. $num = mysql_num_rows($res);
  25. if($num == 0)
  26. $returnString = "NO";
  27. else
  28. $returnString = "YES";
  29. mysql_close($hd);
  30.  
  31. echo $returnString;
  32. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement