Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • what error are you getting? Commented Sep 17, 2019 at 22:21
  • i am getting no data in fetch when executing the PDO->execute; but if i run my printed query in phpmyadmin it gives me the output of 3 rows. Commented Sep 17, 2019 at 22:25
  • Okay, I'll post an answer which is given as an example in PHP.net site. Let's see how it works. Commented Sep 17, 2019 at 22:26
  • Do you have other queries in this same application that are returning the data as expected in your php file? Also, when you tried running the query directly in phpMyAdmin, did you copy and paste the output from the $sql variable or did you re-type it manually? If the contents of $email_f is expected to be HTML, is it possible that you have an encoding issue? Commented Sep 18, 2019 at 4:10