Guest User

Untitled

a guest
Oct 26th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. <?php
  2. $mysqli = new mysqli("localhost", "engammal", "T3H_FISH", "engammal_lss");
  3.  
  4. session_start();
  5.  
  6. $query=$mysqli->query("SELECT * FROM members WHERE username = '{$_SESSION['username']}' AND password = '{$_SESSION['password']}'");
  7. while ($list = mysqli_fetch_array($query))
  8. {
  9. $id = $list['id'];
  10. }
  11.  
  12. $instrument = $mysqli->real_escape_string($_POST['instrument']);
  13. $info = $mysqli->real_escape_string($_POST['info']);
  14.  
  15. if ($instrument && $info)
  16. {
  17. $query = "UPDATE `members` SET `instrument` = '$instrument', `info` = '$info' WHERE id = '$id'";
  18. $mysqli->query($query);
  19. header("Location: edit.php");
  20. }
  21. ?>
Add Comment
Please, Sign In to add comment