I have a profile page and 2 database tables
table1 users
table2 images
the issue is that it will echo out the account profile pic and information for each image. the image gallery for that user should show up under the users profile picture… this is a live view of what I am trying to accomplish. http://bodyelectrictattoo.com/our-team/
but I have been unsuccessful.
everytime the user adds a image it repeats the users profile pic and info… I need for that users gallery to show under there profile pic.
[php]
<?php $db = dbconnect(); $stmt = $db->prepare('SELECT users.email, users.full_name, users.job_title, users.bio, users.profile_photo, images.id, images.artist_img FROM users INNER JOIN images ON users.id=images.id ORDER BY images.id ASC'); $stmt->execute(); $result = $stmt->get_result(); while (($row = mysqli_fetch_assoc($result)) != false) { $id = $row['id']; $full_name = $row['full_name']; $email = $row['email']; $job_title = $row['job_title']; $bio = $row['bio']; $ProfilePhoto = $row['profile_photo']; $artist_img = $row['artist_img']; if (isset($ProfilePhoto) && ! empty($ProfilePhoto)) { $image = "$ProfilePhoto"; } else { $image = "avatar.jpg"; } echo "[/php]