How to do Simple CRUD Operations in WordPress with Elementor

preview_player
Показать описание
Learn how to implement CRUD in WordPress by using the Elementor Pro plugin and writing custom PHP functions that interact with a MySQL database. This allows you to save both Elementor and custom form data to a database in WordPress. After designing a simple web page, this tutorial will teach you how to create, read, update, and delete records right from the web page in the form of a table. This works for both local and remote PHP APIs and databases.

Please understand that this is just a demonstration of how CRUD works and should not be used in a live website since we have not sanitized the user input.

Check out my vlog channel @TonyFlorida

#wordpress #crud #php #elementor
Рекомендации по теме
Комментарии
Автор

Met a backend web developer at a restaurant today and he suggested elements for php in WordPress. I've only done frontend web design, and I'm working on learning python rn.

Thank you for making this! It's my introduction to WordPress, elements, and php.

rmt
Автор

Another awesome CRUD movie from Tony, well done, I enjoyed them both. I am learning to code again after many years. You sped up the learning curve. Keep up the good work. cheers John

johnpocock
Автор

Wow! That's is what I asked for. I am so impressed with what you just taught me.

MJ-qelg
Автор

your workspace is awesome, and I learnt alot of from this, thanks!

stanleyaloh
Автор

Hi Tony
Great tutorial... Question though. If I have a couple pages that do the Create step, how does the Add button know what function to call in my theme's functions.php file? Say I have a form to add people and I have a form to add teams. What ties the add_action( 'elementor_pro/forms/new_record', function( $record, $handler ) to which form?

dean-orochester
Автор

Useful video that im looking for. I have a question. How do I pass warning or any other massage to the view page after the form submitted. Thanks

JanarthanamAanandan
Автор

very nice Tony you are really so simple

alakshyapublicschool
Автор

Hello Tony enjoyed your video v much. Question: if there are more 1 elementor form "add" buttons, how does the hook in the child theme tell the difference between different elementor form data posts?

muse
Автор

Good beginners guide. Thanks. Can you show how to populate a drop-down selection with a database column contents.

rvinothkmr
Автор

Thank you so much brother. Can you make more videos like this one. On how to implement crud, ajax with elementor.

helpmeoh
Автор

thanks good video, if I need to do it on my own wordpress server? what do i replace this with? wp_remote_post

orlandorodriguez
Автор

Best tutorial ever! Keep going!

How do we make it so that people can only CRUD their own records?

mriservice
Автор

What a great content! What if I would like to make a submit from using the database. For example, I build a 100 countries list with lat/long value in the database. While customer select the specific country name, the lat/long data will be sent to another app through the webhook function in Elementor. How to make it work?

thinkastro
Автор

Awesome thanks alot for this tutorial. How would we allow only that user to change their score and not others. How do we incorporate user privileges.

nrsingadasa
Автор

I have question about the read or select data from database part of the video, What if those data will be displayed in a select box or a dropdown according to the current user. is it possible to implement with that kind of structure ?

scabiegaming
Автор

Hi Tony - great video. How would I create a form (or forms) that adds a record to a database in the context of a user and then allows an admin to perform CRUD operations on those records?

davedunn
Автор

Thank you so much Tony,

My challenge here is using the already existing wordpress class 'global $wpdb;' to connect to my database instead of creating a db.php file. How do I go about that?

THank you

NakelJ
Автор

Hi again, if you wanted to validate a field say you had the form prompt for userid, where would you put the validation for valid userid? where is the best place for this type of validation? cheers John

johnpocock
Автор

Hi Tony! Is the Forms API available only to elementor pro? Cause in the function header it indicates "add_action( 'elementor_pro..." and when i change it to just 'elementor' it does not work. Is there any way I can use the Forms API without upgrading to pro?

arniefraga
Автор

Hey! what happens to the id if you delete a row, does all the items in the database adjusts or is it just gone and the increment continues. and how does that affect the code when you get the id from the table with UPDATE and DELETE?

aquilaack