PHP Classes

CRUDify PHP CRUD Class MySQLi: Perform operations to manipulate MySQL records

Recommend this page to a friend!
  Info   View files Example   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 192 This week: 1All time: 8,557 This week: 560Up
Version License PHP version Categories
crudify 1.0.0Custom (specified...5PHP 5, Databases, User Management
Description 

Author

This class can be used to perform operations to manipulate MySQL records.

It can connect to a MySQL database server using the MySQLi extension and performs several type of common operations. Currently it can:

- List all records of a table
- Delete records of a table that match a condition
- Insert a new record to database table from a values submitted via a posted form or an array
- Update existing database table records with values from a form via the POST method or with a given array
- Execute a query about a given user that is logging in and stores its user record values in session variables
- Destroy the logged user session that may have been previously created with the user details retrieved from the database
- Check if a user is logged checking a given session key value and redirect the user browser to a login page or another page depending on the result.

Picture of Braun Okoi Boniface
Name: Braun Okoi Boniface <contact>
Classes: 2 packages by
Country: Nigeria Nigeria
Age: 37
All time rank: 409436 in Nigeria Nigeria
Week rank: 416 Up8 in Nigeria Nigeria Up

Example

<?php
session_start
(); //Optional if you know how to start your session outside this file

function loadClasses($class) {
   
$path = "./classes/";
    require_once(
"{$path}{$class}.php");
}

spl_autoload_register('loadClasses');

//Instantiating the CRUD Class
$crud = new CRUD;

//Making Connection to Database
$conn = $crud->connect($server, $db_user, $db_password, $db);

/**
 * Using CRUDify add() method to add data to databse
 * $crud->add($conn, 'db_table', $_POST, $format, false)
 */
/**
 * Using CRUDify add() method to add data to databse
 * $crud->update($conn, 'db_table', $_POST, $format, false)
 */


Details

CRUDify

Simple PHP Create Read Update Delete Class


  Files folder image Files  
File Role Description
Files folder imageclasses (2 files)
Accessible without login Plain text file app.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  classes  
File Role Description
  Plain text file CRUD.php Class Class source
  Plain text file User.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:192
This week:1
All time:8,557
This week:560Up