Create, read, update and delete MySQL data over HTTP, without writing PHP.
An open-source set of PHP scripts that turns any MySQL database into a JSON API. Send a request with a table name and conditions to create, read, update or delete records, with built-in validation, joins and file uploads.

PHP CRUD API removes the repetitive PHP that every project needs for basic database work. Instead of writing a new endpoint for each table, you point the scripts at your MySQL database and describe what you want in a JSON request body: which table, which columns, which conditions.
It ships as five scripts, one per job:
create.php inserts one or more records, with optional validation.read.php selects records with conditions, joins, ordering and limits.update.php updates records that match your conditions, with optional validation.delete.php deletes records that match your conditions.file-upload.php uploads one or more files and returns their URLs.
Setup is one file: add your database host, username, password and database name to configuration/connection.php.A read request looks like this:
{
"table": "users",
"select": ["id", "name", "email"],
"conditions": [
{ "on": "status", "type": "=", "value": "active" }
],
"order": { "on": "id", "type": "DESC" },
"limit": 10
}
Most PHP projects start with the same plumbing: connect to the database, validate input, build a query, return JSON, and repeat for every table and every operation. It's slow to write, easy to get inconsistent, and adds nothing unique to the product.
PHP CRUD API makes that plumbing generic. One set of scripts handles every table, validation rules are declared in the request instead of hand-coded, and file uploads come with the same approach. Developers spend their time on the parts of the app that are actually theirs.
Works with any table
Name the table in the request; no per-table PHP code.
Full CRUD
Separate scripts to create, read, update and delete records.
Bulk insert
Send an array of records to insert several rows in one request.
Built-in validation
Declare rules per field: required, string, name, email, numeric, min-length, max-length, length and unique.
Flexible reads
Select columns, filter with conditions (=, >=, LIKE and more), order, limit, or pass raw conditions.
Joins
Combine tables with LEFT and other join types in a single read request.
File uploads
Upload multiple files at once with an allowed-extension list; get back the stored file URLs.
Extensible security
Add token checks, authentication or any custom logic in configuration/custom-functions.php.
Free and open source
Whether you're a new startup or a growing business, tell us what you need. We'll plan, design and develop your website, mobile app or custom software, and support it after launch.