Querying |
Post Reply ![]() |
Author | |
Agsabo ![]() Newbie ![]() ![]() Joined: Dec 13 2017 Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() Posted: Dec 13 2017 at 2:06pm |
I need an assistance on how to use open element to querry a new created table from form and then displayed the table INFORMATION in thesame page. Thanks
|
|
Agsb
|
|
![]() |
|
Dmit OE ![]() Admin Group ![]() Joined: May 31 2012 Status: Offline Points: 5283 |
![]() ![]() ![]() ![]() ![]() |
Hi,
1) You should set the page to PHP (menu Page->Extension or Server scripts in older versions) 2) You can add a Code Block Source type PHP (or any other type in which case you should insert <?php .. ?> tags yourself 3) Connect to DB and read data into a variable, e.g. $rows. 4) Now depending on how you handle your tables, you can either transform this into a Javascript variable or generate the table directly by PHP. Example of the latter: add a Code Block Visual where you need your table to be, inside which: <table class='my-table-class'> <?php foreach($rows as $row) { echo "<tr><td>{$row['name']}</td><td>{$row['address']}</td></tr>"; } ?> </table> |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |