Advertisement
Guest User

login

a guest
Aug 14th, 2018
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. <?php
  2.  
  3. $conn=oci_connect("SYSTEM","123456","localhost:1521/ORCL") or die ("Failed to connect to Oracle");
  4.  
  5. $USERNAME = $_POST['USERNAME'];
  6. $PASSWORD = $_POST['PASSWORD'];
  7.  
  8. $sql = "SELECT * FROM LOGIN WHERE USERNAME='$USERNAME' AND PASSWORD='$PASSWORD'";
  9.  
  10. $sqlparse =oci_parse($conn,$sql);
  11. $check = oci_fetch_array($result);
  12.  
  13. $result=oci_execute($sqlparse) or die(oci_error());
  14.  
  15. if(isset($check)){
  16.  
  17. echo "success";
  18. }else{
  19.  
  20. echo "failure";
  21. }
  22. oci_close($conn);
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement