|All requests||>||What is the best PHP crud class?||>||Request new recommendation||>||Featured requests||>||No recommendations|
by ibo kut - 2 years ago (2014-11-01)
I want to create a script for a kind of a CMS written by myself.
I need basic insert, update, list, delete with pagination and image file support.
I can do basic operations but I need a solid code for hack prevention.
So I would like to know that if there is ready to use code for that or not?
There are several other CRUD classes that already store and retrieve data from MySQL or other types databases.
This general purpose forms class comes with a CRUD plugin that can do all you ask but you can integrate with your database with data source class that you provide to define the way you want to map your database records to form fields. So it can work with any database, MySQL or others.
You can define all the form fields you want, including file inputs, so it can support image file upload as you request.
Take a look at the test_crud_input.php example script so you see how you can adapt it to your needs.
This example implements a simple blog system that uses the blog_post_data_source.php as data source class to integrate your CRUD with your database storage.
There is the blog_post_model.php class file to implement the operations to store and retrieve data. In this example it uses session variables to store blog articles, but you probably want to change it to store data in a database.
There is also the blog_post_view.php class file to define how to render the articles in HTML pages when individual posts are being viewed.
If you need specific help using these classes, you can ask on the forms class package support forum.