Advertisement
Guest User

Untitled

a guest
Aug 7th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.76 KB | None | 0 0
  1. <?php
  2.             $db_host = "mysql5";
  3.             $db_user = "abritton";
  4.             $db_pwd = "database";
  5.             $db = "abritton";
  6.             $table = "Staff_Login";
  7.            
  8.             if (!mysql_connect($db_host, $db_user, $db_pwd))    
  9.                 die("Can't connect to database");
  10.                
  11.             if (!mysql_select_db($db))    
  12.                 die("Can't select database");
  13.                
  14.                
  15. mysql_select_db("abritton", $con);
  16. $staffid=mysql_real_escape_string($_POST['staffid']);
  17. $sname=mysql_real_escape_string($_POST['sname']);
  18. $pword=mysql_real_escape_string($_POST['pword']);
  19.  
  20.  
  21.                
  22.                 $sql="SELECT * FROM Staff_Login WHERE Staff_ID ='$staffid' AND Password = 'pword';";
  23. if (!mysql_query($sql)) {
  24. header( 'Location: flightdetails.html' );
  25. exit;
  26. }else{
  27.  
  28. mysql_close($con);
  29.  header( 'Location: flightedit.html' ) ;
  30.  exit;}
  31.        
  32. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement