简体   繁体   中英

Increasing HTML table with PHP

I'm having problems with my work - I want to automatically insert a table when user registers. I've already finished the registration part but how can I show another user the users registered with table tag?

There are two ways to achieve this:

  • If you are using form submit and redirection than put the table in a foreach() loop with the data array coming from database table. Then when ever user comes on this page it takes all the newly added values and render the table.
  • Use jQuery Ajax to save the data and append new <tr> row into table body.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM