How to display comments stored from an array particularly by that email link clicked on


I tried commenting the while loop to test this way but array is empty its displaying this:

Array ( )


So, does the database have anything in it then?

Run the query with the value you are passing in directly in the database. Does it give anything back?


Yes, the database has those two comments which are recently being displayed


That url is not getting an email in the url.


Ok. How shall I fix this? Any suggestion?


Where or how are you building the url’s? Just append the email on to the url’s.


I am trying to do this:

  echo '<h2>People Who have Commented: </h2>';
  while($row = $commenters->fetch()){ 
    echo '<div class="commenters">'.'<ul>'.'<li>'.'<a href="index.php?email">'.$row['email'].'</a>'

this code is before getting the email
Is this correct?


Hello @astonecipher, @johnphpnewb
The problem is solved now. I have fixed it :slight_smile:
Thank you so much for your guidance and time :slight_smile:


I’m happy that you got it working, however, i really didn’t contribute to the resolution. No need to thank me but i appreciate your kindness.

hope you have a nice day :slight_smile: