├── README.md ├── add-new.php ├── db_conn.php ├── delete.php ├── edit.php └── index.php /README.md: -------------------------------------------------------------------------------- 1 | # PHP Complete CRUD Application 2 | 3 | ### ****Creating the Database Table**** 4 | 5 | Create a table named *crud* inside your MySQL database using the following code. 6 | 7 | ```sql 8 | CREATE TABLE `crud` ( 9 | `id` int(255) NOT NULL AUTO_INCREMENT, 10 | `first_name` varchar(255) NOT NULL, 11 | `last_name` varchar(255) NOT NULL, 12 | `email` varchar(255) NOT NULL, 13 | `gender` varchar(255) NOT NULL, 14 | PRIMARY KEY (`id`) 15 | ) 16 | ``` 17 | 18 | ### ****Copy files to htdocs folder**** 19 | 20 | Download the above files. Create a folder named *crud* inside *htdocs* folder in *xampp* directory. Finally, copy the *crud* folder inside *htdocs* folder. Now, visit [localhost/crud](http://localhost/crud) in your browser and you should see the application. 21 | -------------------------------------------------------------------------------- /add-new.php: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | PHP CRUD Application 41 | 42 | 43 | 44 | 47 | 48 |
49 |
50 |

Add New User

51 |

Complete the form below to add a new user

52 |
53 | 54 |
55 |
56 |
57 |
58 | 59 | 60 |
61 | 62 |
63 | 64 | 65 |
66 |
67 | 68 |
69 | 70 | 71 |
72 | 73 |
74 | 75 |   76 | 77 | 78 |   79 | 80 | 81 |
82 | 83 |
84 | 85 | Cancel 86 |
87 |
88 |
89 |
90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /db_conn.php: -------------------------------------------------------------------------------- 1 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | PHP CRUD Application 42 | 43 | 44 | 45 | 48 | 49 |
50 |
51 |

Edit User Information

52 |

Click update after changing any information

53 |
54 | 55 | 60 | 61 |
62 |
63 |
64 |
65 | 66 | 67 |
68 | 69 |
70 | 71 | 72 |
73 |
74 | 75 |
76 | 77 | 78 |
79 | 80 |
81 | 82 |   83 | > 84 | 85 |   86 | > 87 | 88 |
89 | 90 |
91 | 92 | Cancel 93 |
94 |
95 |
96 |
97 | 98 | 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | PHP CRUD Application 20 | 21 | 22 | 23 | 26 | 27 |
28 | 32 | ' . $msg . ' 33 | 34 |
'; 35 | } 36 | ?> 37 | Add New 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 66 | 67 | 70 | 71 |
IDFirst NameLast NameEmailGenderAction
63 | " class="link-dark"> 64 | " class="link-dark"> 65 |
72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | --------------------------------------------------------------------------------