PDO CRUD – Installation & Configuration
In this article, we are going to learn how to install and configure the PDO Crud – Advanced PHP CRUD application (Form Builder & Database Management)
Please note that we have tried to add as much information as possible in this article to make it more clear. To quickly view the installation settings, you can navigate directly to config settings part.
Once you purchased the PDO CRUD from codecanyon, you will be able to download the zip file. Once you extract it, you will find following folders inside PDOCrud folder.
All main code files are inside the “script” folder. Demo folder contains the demo pages for various functionalities of PDO Crud and contains demo codes for all these functions. The documentation folder contains the complete documentation of PDOCrud functions. You can place either a complete folder or “script” folder on your server inside your application. For example, if your application is inside the public_html->xyz.com, then it will be good to place the “script” folder (or complete PDOCrud folder) inside the xyz.com directory.
Configuration
PDOCrud configuration part is quite easy to understand. The configuration file is located at pdcrud/script/config/config.php. All you need to do is set the database related settings.
//script url - Enter complete url inside which script folder is placed. Please note that it doesn't include the script folder
$config["script_url"] = "http://xyz.com/pdocrud/";
/************************ database ************************/
//Set the host name to connect for database
$config["hostname"] = "localhost";
//Set the database name
$config["database"] = "pdocrud";
//Set the username for database access
$config["username"] = "root";
//Set the pwd for the database user
$config["password"] = "";
//Set the database type to be used
$config["dbtype"] = "mysql";
//Please enter purchase code. Please check how to find purchase code details here https://help.market.envato.com/hc/en-us/articles/202822600-Where-Is-My-Purchase-Code-
$config["purchase_code"] = "";
The $config[“script_url”] is the path till script folder and it doesn’t include the script folder. For example, if you have placed script inside the public_html/xyz.com/abc/ folder then your path must be “http://xyz.com/abc/”; here xyz.com is the URL you use to access your application. Next details are database related details like server name (host), database name, username
Also, you will need to enter the purchase code, you can find the purchase code details under downloads-> License certificate & purchase code .
That’s all !!!! Only these settings are required to start your project. Apart from these required settings, there are various settings to ease out various operations of PDO CRUD. You can find all these settings here
Now you can create any php file and include the following file.
require_once "script/pdocrud.php";
Please note that if script folder is at different location then you need to provide path till script folder, For example require_once “abc/script/pdocrud.php”;
You can create an object of PDOCrud class and start calling functions to do required work. For example,
$pdocrud = new PDOCrud();
echo $pdocrud->dbTable("table_name")->render();
You can use the demos and documentation and various tutorials to create complete crud application using PDO CRUD. We have tried our best to explain the installation and working of PDO CRUD. We hope it clears your all doubts related to installation and you can move ahead with your project. If you have any suggestions or comments, feel free to send us email/messages and We’ll be happy to engage in a conversation!