Advertisement
adrianpascua

Untitled

Jun 2nd, 2016
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <?php
  2.  
  3. include '../session.php';
  4. require_once 'config.php';
  5.  
  6. if (isset($_POST['id'])) {
  7.  
  8. $query = "SELECT `id`, `image_name`, `$updated_photo` FROM `crew_info` WHERE `id` = ?";
  9. $stmt = mysqli_prepare($conn, $query);
  10. mysqli_stmt_bind_param($stmt, 's', $_POST['id']);
  11. mysqli_stmt_execute($stmt);
  12. mysqli_stmt_bind_result($stmt, $id, $image_name, $updated_photo);
  13.  
  14. while (mysqli_stmt_fetch($stmt)) {
  15.  
  16. sprintf("%s", $updated_photo);
  17. }
  18.  
  19. header("content-type: image/jpeg");
  20. sprintf("%s", $updated_photo);
  21.  
  22. }
  23. else {
  24. echo "No Image";
  25. }
  26.  
  27.  
  28.  
  29. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement