Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $CUSTID=$_POST['CID'];
- $PASSWORD=$_POST['PASS'];
- $conn=new mysqli("localhost","root","","bank");
- $sql="select accno,balance from users where custid='".$CUSTID."' and password='".$PASSWORD."'";
- $result=$conn->query($sql);
- if($result->num_rows()>0)
- {
- echo "Login Successfull";
- $row=$result->fetch_assoc();
- $accno=$row['accno'];
- $balance=$row['balance'];
- echo "<br>Your account no. is: ".$accno." and your balance is ".$balance;
- }
- else
- {
- echo "<br> User doesn't exist";
- }
- ?>
Add Comment
Please, Sign In to add comment