Advertisement
Guest User

Untitled

a guest
Aug 14th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. <?php
  2. $tbl_name="login"; // table name
  3.  
  4. // Connect to server and select database.
  5.   $connect=odbc_connect('0901070','','');
  6.   if (!$connect)
  7.   {
  8.     exit("Connection Failed: " . $connect);
  9.   }
  10.  
  11. // username and password sent from form
  12. $username=$_POST['username'];
  13. $password=$_POST['password'];
  14.  
  15.  
  16. $sql="SELECT * FROM $tbl_name WHERE username='$username' AND password='$password'";
  17. $result=odbc_exec($connect, $sql);
  18. if (!$rs)
  19.   {exit("Error in SQL");}
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement