Advertisement
Guest User

Untitled

a guest
Apr 20th, 2016
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. session_start(); //open the session for session variables
  2. include 'processerrors.php';
  3. logstats();
  4. set_error_handler("logmyerror");
  5. $host = "localhost"; //the host address to connect to
  6. $user = "root"; //the database user that we connect using
  7. $pass = "09k6CcsGxBq7p"; //the database user's password
  8. $db = "LogIn"; //the database to access
  9.  
  10. //use the variables declared above to connect to the database
  11. $connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");
  12. //select the specific database to read from
  13. mysql_select_db($db) or die ("Unable to connect to database...");
  14. // The query
  15. // Find the location in the table of the entered username
  16. $query = "UPDATE `users` SET `password`='".$_POST["txtPassword"]."' WHERE `Username`='".$_POST["txtUsername"]."'";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement