and I’m trying to put that in my controller to test out how inserting and displaying from a database works before I code a form with submit button. I’ve gone through the controllers video and guide, but couldn’t figure it out. Can someone help me with putting that in a controller. I’m hoping that will then help me learn.
Thank you. I’ve seen the cookbook Forms. Right now, before dealing with the form and submission, I’m trying to learn the logic side of it.
And the database insert would only happen if you have a post request from a form.
Not really, I insert data on page reload. It’s only for me to understand the backend first. The code I posted worked and it inserted a new record, and then retrieved it.
As simple as it is to some, it’s difficult to me. Can someone help show me the code. I appreciate @moonwalk’s description, however, I would understand better seeing the code.