Monday, May 28, 2018

Insert update delete with php in one page

Leave a Comment
PHP crud
insert update delete in php in one page

Hi everyone, in this tutorial will see how to create insert update delete in PHP with modal. it allows beginners to create dynamic PHP website step by step. as well you can use this application for your live projects. its uses security features to prevent from SQL injection. For more security, I have decrypt the data in URL using base64_encode() and base64_decode(). so let's get start step by step.

Here Is The Demo,


Step 1 - Create Database and Table



Step 2 - Dump data to table which created above.



Step 3 - Connection with database


once you dump data to table, let's make connection. create page call connection.php and paste below codes.


Step 4 - Create index page


php mysql add edit delete same page

Now let's create the index.php and paste below codes. make sure to include() connection.php as shows below.


The above page will display all the data from database.

Step 5 - Now let's add data to database


The below codes uses security feature to prevent from third party attacks. as well its preventing from adding duplicate data. its unique and can not add same data twice. there for i have use unique constranit in database.
Now let's create add_author.php and paste below codes


Step 6 - Now let's Update Data


Create edit_author.php and paste below codes.


Step 7 - Now let's Delete Data


Create delete_author.php and paste below codes.


Thank you so much for reading this how to create php website step by step, I hope this tutorial will useful for your future projects. for more updates do not hesitate to contact me via email webriderat@gmail.com.
The complete source code of insert and edit the data using the same form in php has added below to download. if you like this tutorial share with your friends and social media. happy coding.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment