Тёмный
No video :(

PHP CRUD (Create, Update, Delete) with MySQL on a single page 

Awa Melvine
Подписаться 37 тыс.
Просмотров 333 тыс.
50% 1

In this tutorial, we perform Create, update, and delete operations on information on the same web page with the same input form performing both the creating and editing of records.
*** Learn how to build a complete blog with PHP and MySQL: goo.gl/Ru41Tw

Опубликовано:

 

21 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 401   
@AwaMelvine
@AwaMelvine 5 лет назад
💥User registration and login system: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ShbHwaiyOps.html
@shrutisarnaik7042
@shrutisarnaik7042 5 лет назад
Awa Melvine My all codes working perfectly but when i open index.php it show update form rather than save becuase of that i cant insert data Plz help
@tricksmix5627
@tricksmix5627 3 года назад
Brother,i think you should add this in your description.It's help for quick display learn. 00:01 - Demo 01:24 - Intro 05:48 - Create database 06:42 - Insert into database 11:06 - Display records from database 13:00 - Display notification messages 15:28 - Update records 24:54 - Delete records 27:02 - Thank you @Awa Melvine
@MertYerlikaya
@MertYerlikaya 4 года назад
00:01 - Demo 01:24 - Intro 05:48 - Create database 06:42 - Insert into database 11:06 - Display records from database 13:00 - Display notification messages 15:28 - Update records 24:54 - Delete records 27:02 - Thank you @Awa Melvine
@AwaMelvine
@AwaMelvine 4 года назад
You're the best. Thank you, too
@ishaqsg
@ishaqsg 5 лет назад
You done great job. No voice but every thing is clear..
@kydrontillis5732
@kydrontillis5732 6 лет назад
Going to go ahead and prevent anyone that's in beginner stages of PHP from making the same mistake I did. In your server code, in the "update stages" use mysqli instead of mysql. I kept getting syntax errors, until i finally found out that mysql has depreciated. You wont have to do any extra editing. It should help. Bless
@AwaMelvine
@AwaMelvine 6 лет назад
Thank you Kydron Tillis, for this.
@20simoontje
@20simoontje 6 лет назад
Even beter use PDO.
@truecodemedia5099
@truecodemedia5099 6 лет назад
Yes PDO is the best option.
@sheynko306
@sheynko306 6 лет назад
i changed it but it doesnt work either
@tsaxiurgerelt8293
@tsaxiurgerelt8293 5 лет назад
@@sheynko306 if (isset($_POST['update'])) { $name = mysqli_real_escape_string($db, $_POST['name']); $address = mysqli_real_escape_string($db, $_POST['address']); $id = mysqli_real_escape_string($db, $_POST['id']); mysqli_query($db, "UPDATE info SET name='$name', address= '$address' WHERE id=$id"); $_SESSION['msg'] = "Address updated"; header('location: index.php'); }
@KixMayne91
@KixMayne91 7 лет назад
For this CRUD portion, thank you SO MUCH, you truly helped me gain a better understanding for this subject.
@Addicted2OILau
@Addicted2OILau 4 года назад
Thanks buddy, took me all day to go through this , but got there in the end, truly the only only way to learn programming is to do it type it out and go through the frustrations and figure it all out. Thanks for uploading , thumbs up
@AwaMelvine
@AwaMelvine 4 года назад
You have said it very well. Cheers!
@pavanvspk8928
@pavanvspk8928 3 года назад
I love your way of programming bro. Keep posting... An Indian
@HE360
@HE360 5 лет назад
Excellent tutorial. It helped me further understand how PHP works!
@dimitrimokotsolane6719
@dimitrimokotsolane6719 4 года назад
You the man! Couldn't have done this without you. Thank you so much.
@rasangalakshith1141
@rasangalakshith1141 3 года назад
adarei assignment eka goda dammata. ummmmmmmmwah
@kmakashahkma
@kmakashahkma 2 года назад
Thank you so much sir, with your tutorial, I manage to create simple and understand how this syntax works. 😁😁😁
@tsumokd7616
@tsumokd7616 3 года назад
You're the best man.....thank you very much....cause of you i finish my project in database...
@cyrilkariyawasam977
@cyrilkariyawasam977 6 лет назад
Excellent Tutorial Gentleman. Very professional.I tried and 100% working. Thanks a lot for your Time.
@kinelekaite3878
@kinelekaite3878 Год назад
really nice tutorial bro.. may God Bless you
@infantsimon2757
@infantsimon2757 5 лет назад
Successfully I did it .. Thank U bro... God bless U.. Keep doing.
@navaarunbhattacherjee4511
@navaarunbhattacherjee4511 6 лет назад
Everything works fine except the "Update" functionality. However, I appreciate your effort to help the beginners with "simple but elegant PHP coding" idea!
@allanpimble7198
@allanpimble7198 6 лет назад
If the 'Update' functionality is the only issue you are having, you probably using version 7.x of PHP, and this code is written for version 5.x. There should be a letter i after mysql in the functions: $name = mysqli_real_escape_string($db, $_POST['name']); And the mysqli_real_escape_string function must contain two parameters, your database connection - ($db, and the text you wish to escape - $_POST['name']) which gives you ($db, $_POST['name']). In version 5.x you did not need the database connection string in the function. I hope this helps.
@navaarunbhattacherjee4511
@navaarunbhattacherjee4511 6 лет назад
Thanks for your valuable advice! But I somehow solved this problem that day! (:
@sahilvernekar596
@sahilvernekar596 6 лет назад
Navaarun Bhattacherjee can you please tell me as I'm stuck there
@euroseleonida937
@euroseleonida937 3 года назад
Thank you sir for this tutorial it helped us a lot on the system we are working on right now for our final requirement :)
@marcos.wilson
@marcos.wilson 2 года назад
u just save my life dude! tuvm
@mhmzdev
@mhmzdev 4 года назад
Jani you are great! English: You are great brother
@reybasilio6075
@reybasilio6075 6 лет назад
This is GREAT and LEGIT! Thanks AWA! Upload videos about security please!!!
@guillaumekieffer489
@guillaumekieffer489 4 года назад
Thanks a lot, I had a problem with the update and your video solved it.
@muthokabrian2138
@muthokabrian2138 4 года назад
thanks melvine,,your code well illustrated and works perfectly
@kebronsolomonzerie3523
@kebronsolomonzerie3523 3 года назад
You saved my life bro thank you
@chetankale9224
@chetankale9224 5 лет назад
Very Helpful Video Bro Thank You
@hamadmobeen5923
@hamadmobeen5923 3 года назад
Really appreciate your video. Taught me a lot. Great content. Keep up the good work.
@gameworlduk6657
@gameworlduk6657 2 года назад
ru-vid.com/group/PLdoUjOuWL_owKZgygdcljLwa1ShdGvIp1
@mdenamulhasan4787
@mdenamulhasan4787 3 года назад
Thanks I was humbly needed
@haribalakrishnan162
@haribalakrishnan162 3 года назад
thank you so much bro.its very timely help for me bro
@antonioaquino8954
@antonioaquino8954 6 лет назад
Bro this is a life saver. damn it! Good Job!
@gurudevtechno6788
@gurudevtechno6788 5 лет назад
THANK U SO MUCH CODER.....IT WORKS PERFECTLY
@babydimplesz64
@babydimplesz64 5 лет назад
GuruDev Techno how did you do it? I can’t do it 😔😔
@Arthursama25
@Arthursama25 2 года назад
Awesome tutorial, it helped a lot!
@noirblack7360
@noirblack7360 3 года назад
Again, thank you for exsisting.
@KkKk-og3of
@KkKk-og3of 4 года назад
Really very best method thank you sir
@meahahmed3709
@meahahmed3709 3 года назад
For anyone using this now. DON'T USE MYSQLESCAPESTRING ITS OUTDATED, just skip that and take the post value from the text :)
@marcmolander1366
@marcmolander1366 2 года назад
Thanks man, remade this twice with the same error xD
@nayeemchowdhury2497
@nayeemchowdhury2497 5 лет назад
when ID is show in table edit option is not work. can you explain it.
@denniskipkoech566
@denniskipkoech566 6 лет назад
Thanks, the soruce code was well minimalist
@marshallmathers1047
@marshallmathers1047 6 лет назад
Man you are the best...I got solution completey..
@arrontaylor5613
@arrontaylor5613 4 года назад
Keep getting an error undefined variable “edit_state”
@buzznut
@buzznut 6 лет назад
YESSSS YOU ARE A LEGEND !!, THANKS ALOT
@keerthanarajeev1328
@keerthanarajeev1328 5 лет назад
You are a blessing!!
@amirulafiq4371
@amirulafiq4371 6 лет назад
Hi I'm currently doing a final report on my industrial training CRUD project and I was wondering if you could help me determine the strengths and weaknesses of the system itself
@owaisipoetry6412
@owaisipoetry6412 5 лет назад
Thank you for very helpful video. Keep doing. all the best
@Rohit-si5uf
@Rohit-si5uf 5 лет назад
superb bro your source code helped me.
@viniciustinga
@viniciustinga 7 лет назад
Thanks a Lot....Awa Melvine!!!
@danielmolla1239
@danielmolla1239 2 года назад
Thank you! You saved me!
@satyaprakashsahoo7772
@satyaprakashsahoo7772 5 лет назад
Awesome work bro..
@lukedodson3441
@lukedodson3441 6 лет назад
everything working thanks for the help
@kashmir398
@kashmir398 5 лет назад
I have a problem. my code was working well until i started coding for update records. the error just shows " unexpected end of file. I tried searching if i missed out any brackets in both index.php or server.php but i cant seem to get where the problem is. I hope you can help me on this
@souhayleBartale
@souhayleBartale 3 года назад
great job, thankyou
@Andres33260
@Andres33260 7 лет назад
thanks for share your knowledge, I can learn easily...
@AwaMelvine
@AwaMelvine 7 лет назад
Thank you Andres. I'm glad it helped.
@rjmacalino3186
@rjmacalino3186 6 лет назад
you initialize the value of ID = 0; if you create another record then the record will have 0 ID then you won't be able to create another record because you already have a record that has "0" ID and as you may know the ID is primary key.
@saacmntnz
@saacmntnz 6 лет назад
thats my problem. how to solved it?
@valentinbuliga1775
@valentinbuliga1775 6 лет назад
make id auto_increment
@robertdeanmarti5749
@robertdeanmarti5749 3 года назад
the delete button last part of the video doesn't work on my web delete when I click the delete nothing happen
@coffelova
@coffelova 3 года назад
same for me, i don't know how to fix it
@temirkhanamanbaev42
@temirkhanamanbaev42 4 года назад
Thanks man, good job!
@animalinstinct2023
@animalinstinct2023 3 года назад
Thank you very much!
@safouanelharrak3660
@safouanelharrak3660 3 года назад
it's work thank you Sir
@aiswaryasatheesh8863
@aiswaryasatheesh8863 3 года назад
Thank you sir..❤️😊
@azuretasugach6124
@azuretasugach6124 3 года назад
it works nicely
@saidajaraam5255
@saidajaraam5255 6 лет назад
thanks for this vedio it's very usefull for me
@loremzyn5789
@loremzyn5789 5 лет назад
it was nice .. and right for as biggeners
@varshaganger8798
@varshaganger8798 4 года назад
thank a lot sir these code is helpful to me as i try in other site video
@tsvetomir5309
@tsvetomir5309 5 лет назад
dude you are the best
@asahinamikage6818
@asahinamikage6818 6 лет назад
THANK YOU VERY MUCH BROOO! AWESOME VIDEO!
@sivagade4263
@sivagade4263 5 лет назад
tour tutorial is so good and neet............ please do another tutorial id , name , address, phonenumber, image
@knzdespair
@knzdespair 4 года назад
PLEASE HELP ME WITH THIS PROBLEM " Warning: count(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\crud\index.php on line 8 " It occurs when I'm clicking the EDIT BUTTON....
@ableaze231
@ableaze231 6 лет назад
awesomeee!!!!! it working
@tutyhutabarat6310
@tutyhutabarat6310 5 лет назад
The message showed that it was updated but the letters didn't change. Help me!
@dartv1337
@dartv1337 7 лет назад
Thank you so much for the codes!
@Yoonaa_kimmy
@Yoonaa_kimmy 7 лет назад
it helps !! thanks a lot !!
@aishwaryaverma7129
@aishwaryaverma7129 3 года назад
in address update getting this error "mysqli_fetch_array() expects parameter 1 to be mysqli_result"
@ralphtalaro3725
@ralphtalaro3725 5 лет назад
Hi sir i have problem on update Fatal error: Uncaught Error: Call to undefined function mysql_real_escape_string() in C:\xampp\htdocs\crud\server.php:24 Stack trace: #0 {main} thrown in C:\xampp\htdocs\crud\server.php on line 24
@ralphtalaro3725
@ralphtalaro3725 5 лет назад
this code work for me. $name = mysqli_real_escape_string($db, $_POST['name']);
@armandnduwamungu41
@armandnduwamungu41 3 года назад
your help would be much appreciented
@gloriabukachi1
@gloriabukachi1 6 лет назад
mine was not working until i did some adjustments of including the $db which is the connection to the database... // update records if (isset($_POST['update'])) { $name = mysqli_real_escape_string($db, $_POST['name']); $address = mysqli_real_escape_string($db, $_POST['address']); $id = mysqli_real_escape_string($db, $_POST['id']); }
@roncadabuna9368
@roncadabuna9368 6 лет назад
You saved thank you
@rizlajoseii9226
@rizlajoseii9226 5 лет назад
Cool. This one helps
@gloriabukachi1
@gloriabukachi1 5 лет назад
ron cadabuna - you are welcome
@gloriabukachi1
@gloriabukachi1 5 лет назад
Renz Gerzon - you are welcome
@ammarizzuddeen3977
@ammarizzuddeen3977 5 лет назад
where should i put this? i dont get it yet
@mykx1386
@mykx1386 6 лет назад
great tutorial!
@ideepdave
@ideepdave 6 лет назад
Awesome. Thank you very much
@jonyhernandez2256
@jonyhernandez2256 4 года назад
Men pleaseee! help me, i have a select list with fk on another table, and the edit dont work... help meee
@robiansyahchubiel870
@robiansyahchubiel870 4 года назад
Its great thank you man, auto subscribe
@hamzahaider5401
@hamzahaider5401 Год назад
I'm not get source code who you have draw in description
@armandnduwamungu41
@armandnduwamungu41 3 года назад
how come mysql_real_escape_string is unidentified for me
@robianhung5154
@robianhung5154 7 лет назад
Thank you. I got it!
@philt7568
@philt7568 4 года назад
By the is there a way where you have a third button and once you click on it it remove the data and insert it to another table database?
@koensampers5505
@koensampers5505 4 года назад
Amazing video thank you
@emilcruz3087
@emilcruz3087 3 года назад
i cant fix it line 25 Whats the problem uncaught undefine why?? plsss tell me what is the problem in line 25 >??
@jayangachandeepa4571
@jayangachandeepa4571 4 года назад
I have a problem. i'm using wampserver, not xwamp. so i have error Call to undefined function mysql_real_escape_string() so i change my code into $name = mysqli_real_escape_string($db, $_POST['name']); so after that there no any error.but don't update the database. how i solve it??? please help me.. thank you.
@Ireland1981
@Ireland1981 5 лет назад
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, bool given in /opt/lampp/htdocs/PhpCrud/index.php on line 65 Please help
@zoranmarkovic1295
@zoranmarkovic1295 5 лет назад
I have the same problem. I can't find a solution.
@chowdhurymobarrathaider9052
@chowdhurymobarrathaider9052 5 лет назад
github.com/adnanchowdhury007/CRUD here is the full code
@serdarkshadow2455
@serdarkshadow2455 2 года назад
@@chowdhurymobarrathaider9052 thank you, the codes runs really well.
@akhilkazi1454
@akhilkazi1454 4 года назад
How to count deleted and inserted rows in same page.
@pavant8761
@pavant8761 3 года назад
Hi... What is the purpose of SESSION concept here? Why to use especially? Plzz clear to this novice. Tq
@ruthvitech4925
@ruthvitech4925 5 лет назад
help me---- in update process--- its not going to update/edit data..its updating new row of record..how to slove this...
@luzvimindab.mollaneda8964
@luzvimindab.mollaneda8964 3 года назад
why update records codes don't work for me?
@charlesbaylon6600
@charlesbaylon6600 5 лет назад
the .msg css not working, the same with fetching the record to be updated. Wtd? Thank u
@anonymone4459
@anonymone4459 4 года назад
Thank you brother!
@ofirt7
@ofirt7 6 лет назад
Thank you for the great tutorial! I have one question though when I click on "edit" or "delete" the page is refreshing and I see in the video that your page isn't refreshing on every click, do you know how can I fix it?
@michaelpulga7760
@michaelpulga7760 5 лет назад
please help!!! if i click save then the record will be saved on the database but when i refresh on the page after i click save the record on the database will duplicate. its like its saving again if you refresh after you click save. how to fix this? TIA
@sonnguyen-eh3qp
@sonnguyen-eh3qp 5 лет назад
Notice: Array to string conversion in
@chexwahussen690
@chexwahussen690 5 лет назад
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in line 18 >
@dimitrimokotsolane6719
@dimitrimokotsolane6719 4 года назад
Chexwa Hussen hey please help with the same problem. Thank you.
@jbuscaTV
@jbuscaTV 4 года назад
very informative ..
@sakuramikan01
@sakuramikan01 6 лет назад
"no date resources are configured to run this sql" name is fine but in address, it displays that message. i wonder what was wrong
@bharatichopade0
@bharatichopade0 5 лет назад
hank you for very helpful video
@simplynmadula8783
@simplynmadula8783 5 лет назад
No connection with database. HELP. Beginner feels huhu 😖 I am using wamp
@yelarysbadelkhan9101
@yelarysbadelkhan9101 6 лет назад
Hello guys, from where he takes the path to database? He wrote ('localhost','root', '', 'crud'), in time: 7:14.
@whitee0272
@whitee0272 6 лет назад
from the folder where there is your program his folder's name is Crub and yours you should put it on "www" if you are working with wampserver
@syahira7786
@syahira7786 4 года назад
Sir why when i updated selected row it updated all rows with the same information. Pls help me!