Guest User

Untitled

a guest
Dec 2nd, 2016
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.70 KB | None | 0 0
  1. #!/usr/local/bin/php
  2. <?php
  3. $connection = oci_connect($username = 'jmillard',
  4. $password = '4365Jfm1',
  5. $connection_string = '//oracle.cise.ufl.edu/orcl');
  6. $uname = $_POST["uname"];
  7. $pwd = $_POST["pwd"];
  8.  
  9. //Checks if that instance of username/password exists
  10. $statementBool = oci_parse($connection, "SELECT EXISTS(SELECT * FROM member where username= '$uname' and password = '$pwd')");
  11. //Stores boolean in variable then outputs variable to check validity
  12. $validCheck = oci_execute($statement);
  13. echo "$validCheck";
  14.  
  15. //Updates curren user with new login
  16. $statementLogin = oci_parse($connection, "UPDATE CurrentUser SET curUsername = '$uname'");
  17.  
  18. header("http://www.cise.ufl.edu/~llantz/main.html");
  19.  
  20. ?>
Add Comment
Please, Sign In to add comment