Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host = "10";
- $user = "Dapp";
- $pw = "2@";
- $db = "Dpp";
- $con = mysql_connect($host,$user,$pw) or die(mysql_error());
- mysql_select_db($db) or die(mysql_error());
- mysql_query("SET CHARACTER SET utf8");
- mysql_query("SET NAMES 'utf8'");
- $Action = $_GET["Action"];
- $mid = $_GET["MID"];
- switch ($Action)
- {
- Case "CheckMID":
- $result = mysql_query("SELECT * FROM Merchants WHERE MID = '$mid';");
- if (mysql_num_rows($result) == 0) {
- print json_encode("No");
- } else {
- print json_encode ("Yes");
- print json_encode ($result);
- }
- break;
- Case "GetMerchantName":
- while($row = mysql_fetch_array($query)){
- echo "\r\n".$row['MERNAME'];
- }
- $text = mysql_query("SELECT MID, MERNAME FROM Merchants WHERE MID LIKE '$mid';") or die(mysql_error());
- print json_encode ($text);
- break;
- Case "Mail":
- break;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement