Advertisement
giraffeinatutu

2214_fail

Aug 15th, 2014
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. <?php
  2. session_start();
  3.  
  4.  
  5. // Establish a connection to the database
  6. $con = mysqli_connect("localhost", "cairil_php", "phpsql");
  7.  
  8. // Check if there were any issues connecting to the database
  9. if ( mysqli_connect_errno() != 0)
  10. {
  11. die("An error occurred trying to establish a connection: " .mysqli_connect_error());
  12. }
  13. $locked = mysql_query("UPDATE customer SET `locked_flag`=1 WHERE 'cust_user'="$_SESSION['user']"");
  14.  
  15. // Run the query using the connection established earlier and assign the results to a results object.
  16. $rs = mysqli_query ($con, $locked);
  17.  
  18. if ( !$rs)
  19. {
  20. $result = "There Was an Error Changing the Record".mysqli_error();
  21. }
  22. else
  23. {
  24. $result = "Your lack of password disappoints me. Your account is locked";
  25. }
  26.  
  27. <html>
  28. <head>
  29. <title> 2214_LoginAction.php</title>
  30. </head>
  31. <body bgcolor="#bbccaa">
  32. <br/><br/><br/>
  33. <center>
  34. <h3><?php echo($result); ?></h3>
  35. <br/>
  36. <a href="2214_login.php">Back to the Login Page</a>
  37. </center>
  38. </body>
  39. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement