Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include '../session.php';
- require_once 'config.php';
- if (isset($_REQUEST['id'])) {
- $query = "SELECT `id`, `image_name` FROM `crew_info` WHERE `id` = ? AND `image_name` = ?";
- $stmt = mysqli_prepare($conn, $query);
- mysqli_stmt_bind_param($stmt, 'is', $_REQUEST['id'], $image_name);
- mysqli_stmt_execute($stmt);
- mysqli_stmt_bind_result($stmt, $id, $image_name);
- while (mysqli_stmt_fetch($stmt)) {
- echo sprintf("%s", $image_name);
- }
- $img_dir = "../updated_photo/";
- $images = glob($img_dir."*.jpg");
- if (count($images) > 0) {
- $img = $images[0];
- echo '<img src="'.$img.'" />';
- }
- else {
- echo "No Image";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement