Learn PHP - CRUD Operations in PHP for beginners - XAMPP and PHPMyAdmin

preview_player
Показать описание
In this PHP tutorial for beginners I'm going to show you how to use the full CRUD operations in PHP to create return, update and delete data from a MySQL database.

First, we build a MySQL database to store the data collected using XAMPP server, a MySQL database and PHPMyAdmin.

Code Repository:

We then develop using PHP and SQL a simple script to connect to a database and build a form to collect data from a user. Data collected to sent via POST to the PHP script to them place the data into the MySQL database. We verify the data inserted into the database using PHPMyAdmin.

Next, we develop a form to allow users to update data from the MySQL database. First we retrieve the data from the database and display into the form We then use SQL UPDATE to update the database with the new data.

I also show you how to select information and display in the browser, as well as using Bootstrap framework to format the data on the screen.

Finally we build a delete function so that we can delete data from the database

In this tutorial I cover a wide range of PHP concepts. MySQL database connectivity, PHP functions, variables, conditional statements embedding the principles of DRY – don’t repeat yourself.

Learn PHP 7 – Check out my other PHP tutorials for beginners
If you like this PHP tutorials and website development you will love our PHP tutorials for beginners course where we hope to teach you some of the basic functionality of PHP in a practical and fun way.

SUBSCRIBE to get more free tutorials, courses and code snippets!

Follow us on Facebook
Follow use on Twitter:
Рекомендации по теме
Комментарии
Автор

So glad that i've found this. Very calm and clear explained. Thank you so much for this video.

nedimzahirovic
Автор

I am learning PHP and I loved the tutorial and your explanation. Very calm, organized, and practical. Thank you so much :) I hope to see more applications like this

TheLinguists
Автор

Very clear, concise and well explained.

vusimbhamali
Автор

You can also use to sanitize your data by using FILTER_SANITIZE_STRING. Great Job!

rembrandt
Автор

I much prefer the format of this video where the code is typed out before the explanation

djdizolve
Автор

Very detail, however, in my opinion, this tutorial could give 10 times help to beginners if the present order could be more explicit clear, for instance: start from simple read/insert/delete/update, separate the css/bootstrap in 2nd part, in this way, user could learn more efficient and get much clear concept. my 5 cents. thanks a lots.

jackli
Автор

this is my first time on vs code it displays
.
.

php executable not found. install php and add it to your path or set the php.debug.executablepath setting

jericmangundayao
Автор

Thank you for your tutorial i understand clearly. I have a question in the insert validation part when i insert title with space even it the same title that i inserted previously it still inserted instead of This title already exists - please try a different title name hope you can give me example how. Thank you.

johngabrielcuna
Автор

Line 55 in functions.php should be: $check_content = mysqli_query($conn, "SELECT * FROM posts WHERE title= '$title'") not $check_content = mysqli_query($conn, "SELECT 'title' FROM posts WHERE content= '$title'") the next line should be > 0){
echo "<h4>Title not available</h4>";
die;
if die is not added you will get "$insert_query not defined" error

azureliseraleighchocolatec
visit shbcf.ru