{"id":26255719,"url":"https://github.com/foulow/phpusercrudexample","last_synced_at":"2026-05-06T17:31:26.777Z","repository":{"id":116408852,"uuid":"274258505","full_name":"foulow/phpusercrudexample","owner":"foulow","description":"A PHP vanilla User CRUD example with MySQL, PostgreSQL, ... (more in future)","archived":false,"fork":false,"pushed_at":"2021-01-07T18:39:54.000Z","size":57,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-22T18:58:53.730Z","etag":null,"topics":["mysql","php","postgresql"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foulow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-06-22T22:52:01.000Z","updated_at":"2022-10-19T02:54:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"85c2bcea-7e18-455d-9cf2-7d96389ed564","html_url":"https://github.com/foulow/phpusercrudexample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/foulow/phpusercrudexample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foulow%2Fphpusercrudexample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foulow%2Fphpusercrudexample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foulow%2Fphpusercrudexample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foulow%2Fphpusercrudexample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foulow","download_url":"https://codeload.github.com/foulow/phpusercrudexample/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foulow%2Fphpusercrudexample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32704274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mysql","php","postgresql"],"created_at":"2025-03-13T19:26:55.853Z","updated_at":"2026-05-06T17:31:26.758Z","avatar_url":"https://github.com/foulow.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# phpUserCRUDexample\nA PHP vanilla User CRUD example with MySQL and PostgreSQL support.\n\n## First steps\nTo get this repository ready for personal use you can open a terminal and run the following commands:\n\n    $ git clone https://github.com/foulow/phpusercrudexample.git\n    $ cd phpusercrudexample\n    $ rm -rf ./.git/\n    $ git init\n    $ git add .\n    $ git commit -m \"Initial commit\"\n\n\n## Configuration\nJust change the constants value defined on the `config/config.inc.php` file for the connection to your MySQL Server (preferably use localhost).\u003cbr\u003e\n\n    // Database connection constant definitions.\n    define('MYSQL_HOST', '{server_name}');\n    define('MYSQL_USER', '{user_name}');\n    define('MYSQL_PASSWORD', '{user_password}');\n    define('MYSQL_DATABASE', '{database_name}');\n\n    // Database connection constant definitions for PostgreSQL.\n    define('POSTGRESQL_HOST', '{server_name}');\n    define('POSTGRESQL_DATABASE', '{database_name}');\n    define('POSTGRESQL_USER', '{user_name}');\n    define('POSTGRESQL_PASSWORD', '{database_name}');\n\n    // set the dbcontext to be use mysql :=\u003e MySQL, pgsql :=\u003e PostgreSQL\n    define('DBCONTEXT', 'mysql');\n\n***Note:*** You can generate the database and tables used for this example using the \"mysql_db_migration.sql\" or \"postgre_db_migration.sql\" files on the Migrations folder. Or just create your own database. \n\n\n## Quick Tests\nFor a quick test you can run it locally by installing php and composer then run it with:\n\u003cbr\u003e\n\n    $ composer update\n    $ php -S localhost:8080\n\nOr remotely with a heroku account and running:\n\n    $ heroku git:remote -a YOUR_HEROKU_PROJECT_NAME_HERE\n    $ git add .\n    $ git commit -m \"DO NOT FORGET TO COMMIT YOUR CHANGES\"\n    $ git push heroku master\n\n***Note:*** Make sure you have a MySQL or PostgreSQL server configure in your `config/config.inc.php` file before going online. And heroku handle sessions differently so you will need a in-memory-storage service like 'MemCachier' in order for the logins to work.\n\nAnd that should be it. Hopping this can be of any help for those embargoing in the road of PHP learning.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoulow%2Fphpusercrudexample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoulow%2Fphpusercrudexample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoulow%2Fphpusercrudexample/lists"}