get_api_duplicate.php 356 B

1234567891011121314
  1. <?php
  2. include("connectSQL_Component.php");
  3. $result = "";
  4. if (isset($_POST['APIName'])) {
  5. $sql = "SELECT [APIName] FROM [API_Table] WHERE [APIName] = ?";
  6. $fetchResult = sqlsrv_query($conn, $sql, array($_POST['APIName']));
  7. while ($row = sqlsrv_fetch_array($fetchResult)) {
  8. $result = $row['APIName'];
  9. }
  10. }
  11. echo json_encode($result);