Advertisement
Guest User

Untitled

a guest
Aug 10th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. <?php
  2. if(isset($_POST['update'])) {
  3. $server = "WIN-2012SRV-BK";
  4. $user = "sa";
  5. $pass = "";
  6. $db = "UTSMSVFT_LIVE";
  7. $connInfo = array("Database"=>$db, "UID"=>$user, "PWD"=>$pass);
  8. $conn = sqlsrv_connect($server, $connInfo) or die( print_r( sqlsrv_errors(), true));
  9.  
  10.  
  11.  
  12. //$pin = $_POST['pin'];
  13. $phone = $_POST['phone'];
  14.  
  15. $sql = "UPDATE UTSMSVFT_LIVE.switch.Subscriptions SET pin='*',status='pending' WHERE phone = ?" ;
  16. //$sqlsrv_select_db('test');
  17. $params = array($_POST['phone']);
  18. //$sqlsrv_query($conn, $sql, $params);
  19. $stmt = sqlsrv_query($conn, $sql, $params);
  20.  
  21. //$stmt = sqlsrv_query( $conn, $sql, $params);
  22.  
  23. if( $stmt === false ) {
  24.  
  25. die( print_r( sqlsrv_errors(), true));
  26.  
  27. }
  28. else
  29.  
  30. {
  31.  
  32. echo "Record update successfully";
  33.  
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement