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


#42

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

Array ( )


#43

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?


#44

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


#45

That url is not getting an email in the url.


#46

Ok. How shall I fix this? Any suggestion?


#47

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


#48

I am trying to do this:

//TODO
  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>'
    .'</li>'.'</ul>'.
    '</div>';
  }

this code is before getting the email
Is this correct?


#49

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:


#50

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: