Retrieve and display data from table using Shortcode EXEC PHP - Wordpress Solution
[Solved] - Retrieve and display data from table using Shortcode EXEC PHP - Wordpress Solution |
---|
Try following codes |
I have a form using Gravity Forms that collects first name, last name, city and state on my wordpress site. I want to then display that data in a table on a wordpress page, sorted by last name.
I started using the Shortcode EXEC PHP plugin to create the code to retrieve/display the data, but I just can't seem to get it to work.
I need this completed by Wed July 7.
Update: Here is the code that I was trying to get to work:
Notice all four fields have the same lead_id, so you'll need to filter by that, plus only grab those fields that are form_id=4. The last part is what was failing - when it was trying to output the results. Although I need to the results in an html table, so that part needs to be changed anyway. And perhaps this is not the most efficient SQL query, so if you can improve it, that would be great too. Since I'm really out of my league here, I'll need all the code provided for me. Attached is a screenshot of the db table screenshot and dump ![]() Solution - 1no need to use external plugin for this... simple add your shortcode and return all records in shortcode
|
Date: 2022-10-21 05:21:58 |
Category: Wordpress |