daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Oct 3rd, 2017 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. include "newdb.php";
  3. $dbcon=connect_db();
  4. ?>
  5. <?php
  6. $username=$_POST["username"];
  7. //$username='selva';
  8. //$password='password';
  9. $flag=0;
  10. $statement="UPDATE users SET password '12345' where username = '$username'";
  11. //echo $statement;
  12. //exit();
  13. if (mysqli_query($dbcon, $statement))
  14. {
  15.     $myObj=new \stdClass();
  16.     $myObj->result = "1";
  17.     $myJSON = json_encode($myObj);
  18.     echo $myJSON;
  19.     exit();
  20. }
  21. else
  22. {
  23.     $myObj=new \stdClass();
  24.     $myObj->result = "2";
  25.     $myJSON = json_encode($myObj);
  26.     echo $myJSON;
  27.     exit();
  28. }
  29. close_db();
  30. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top