Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "newdb.php";
- $dbcon=connect_db();
- ?>
- <?php
- $username=$_POST["username"];
- //$username='selva';
- //$password='password';
- $flag=0;
- $statement="UPDATE users SET password = '12345' where username = '$username'";
- //echo $statement;
- //exit();
- if (mysqli_query($dbcon, $statement))
- {
- $myObj=new \stdClass();
- $myObj->result = "1";
- $myJSON = json_encode($myObj);
- echo $myJSON;
- exit();
- }
- else
- {
- $myObj=new \stdClass();
- $myObj->result = "2";
- $myJSON = json_encode($myObj);
- echo $myJSON;
- exit();
- }
- close_db();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement