Database and Form

Hi Guys need some help.

I want to create a form with the following :
Name
Address
Contact
Message

When user submits the form i want it to be stored on a database and then displayed on a separate page.

Is it possible to then change the message through the form when required and the new message be updated on the page ?

Thanks

What you want to accomplish is in essence a CRUD structure. You want to:

  • C reate
  • R ead
  • U pdate
  • D elete

I would suggest to read tutorials like: Click here for a tutorial in CRUD and practice with the structure and mind-set. When you have completed one or more tutorials, then go back to this question and try to answer your own question. I think this would be the best way to learn. :slight_smile:

What you are asking for is very basic and can be done easily by creating CRUD operation, which include Create, Read, Update and Delete operations. There are three ways to do it:

Single Query Execution
Multi Queries Execution
Prepared Statement Execution

You have to start this with selecting the data from your database using single query execution.

Then you can update and delete using prepared statement.

Read tutorial on Creating a simple CRUD in PHP and MySQL (https://www.cloudways.com/blog/execute-crud-in-mysql-php/ )

Sponsor our Newsletter | Privacy Policy | Terms of Service