> Hi> How can i change the content in one html page by clicking a button in another html > page? Like i have a page with a form for adding user. After i click the submit > button, it would submit the information form and also add a new table row in another > page which has a table for displaying the user information.> any help would be appreciated.
The general workflow for server side rendering, is:
1. forms, (and POST requests) collect information from users and update a database (the
2. GET requests serve eitehr static files, or rendered HTML. Rendered HTML changes its
form based on the persistent data in teh database.
Therefore, when you submit the form, you will probably want to add a new row in the
database, and when you reload the second page, it will be rendered using objects loaded
from the database, which will include your new row.
Note, this requires the user to reload the page. If you want the second page to update
automatically, you will require Sockets or JS sending periodic AJAX requests. We'll
discuss this later in the course.