# Database and Form

**URL:** <https://www.phphelp.com/t/database-and-form/26769>\
**Category:** General PHP Help\
**Created:** [July 25, 2018, 6:52pm UTC](https://www.phphelp.com/t/database-and-form/26769 "2018-07-25T18:52:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![webchambers](https://www.phphelp.com/letter_avatar_proxy/v4/letter/w/ed655f/32.png) [@webchambers](https://www.phphelp.com/u/webchambers)\
**Post date:** [July 25, 2018, 6:52pm UTC](https://www.phphelp.com/t/database-and-form/26769/1 "2018-07-25T18:52:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![streakerstyle](https://www.phphelp.com/user_avatar/www.phphelp.com/streakerstyle/32/1837_2.png) [@streakerstyle](https://www.phphelp.com/u/streakerstyle)\
**Post date:** [July 26, 2018, 6:46am UTC](https://www.phphelp.com/t/database-and-form/26769/2 "2018-07-26T06:46:57Z")

</div>

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](https://www.startutorial.com/articles/view/php-crud-tutorial-part-1) 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. 🙂

---

<div class="post-metadata">

**Author:** ![olidev](https://www.phphelp.com/letter_avatar_proxy/v4/letter/o/e5b9ba/32.png) [@olidev](https://www.phphelp.com/u/olidev)\
**Post date:** [September 6, 2018, 10:40am UTC](https://www.phphelp.com/t/database-and-form/26769/3 "2018-09-06T10:40:45Z")

</div>

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/](https://www.cloudways.com/blog/execute-crud-in-mysql-php/) )
