Mekaboo Posted November 3, 2021 Share Posted November 3, 2021 Hey😊 Having issue with "Comment" output showing. Everythig else works. Here is my code: ``` <form name="frmImage" enctype="multipart/form-data" action="" method="post" class="frmImageUpload"> <label>Upload Image File:</label><br/> <input name="userImage" type="file" class="inputFile" /> <label>Title/Content:</label><br/> <input type="text" name="comment"><br> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> <input type="submit" value="Submit" name="submit"> </form>  <?php require_once "db.php"; $sql = "SELECT imageId FROM output_images ORDER BY imageId DESC"; $result = mysqli_query($conn, $sql);  // Loop thru comments and display all of them while($row = mysqli_fetch_array($result)) { printf("%s (%s)\n", $row["username"], $row["comment"],$row["imageId"]); ?> <div class="row"> <a href="pro.php"> <div class="card"> <h5 class="card-content"><?php echo $username;?> </h5> <p><?php echo $_POST["comment"]; ?></p><br> <img src="imageView.php?image_id=<?php echo $row["imageId"]; ?>" class="card-img-top" alt="..."> </div> </a> ``` Thank ya 💜 Link to comment Share on other sites More sharing options...
niche Posted November 3, 2021 Share Posted November 3, 2021 (edited) Looks like your while loop is open Edited November 3, 2021 by niche 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now