Just a simple little bash prompt.
Code Library
Mr PHP provides this code library as a way to share code snippets, tech solutions and various information that my be helpful to other coders and the programming community at large.
18 Archived Modules for phpShop
A few years ago I decided phpShop wasn't doing much and the community was nothing near the size of osCommerce so I switched. Managing and supporting the modules I had for phpShop became tedious so I removed them from the site.
Monitor Multiple MySQL Servers using PHP
This is a quick 1 page application to monitor your replicated MySQL servers.
Use it as you will. Enjoy!
Detect Browser Close or Navigation Away in jQuery
This quick snippet of jQuery that will allow you to so do something before the user navigates away from a page or closes the browser or tab.
In this example I have mixed in some JavaScript Date functionality to give a timer of how long you were on the page.
Importing Data from CSV into CakePHP
This is a quick little method that lets you get some data from a CSV into a table.
It should work with very large CSV files as it only has to read one row at a time.
Auto-Set the ID beforeSave in CakePHP
In this quick snippet of code I will be setting the ID of a model based on other fields given. We want to save a note about each Post that is different for every Client, however we do not want to have to get the ID every time we save the data.
Admin Editable Settings and Theme in CakePHP
Usually the client will request for me to give them a way to edit simple settings in their application.
I decided to read all the variables from the database in the beforeFilter to make them available in any controller.
Simple Auth with Users HABTM Groups in CakePHP
In almost every project I need to setup some sort of login, and usually it requires group access to certain data depending on different criteria.
For example I may have groups Admin+Member and I want Members to only be able to see other Users Profiles if the other Profile is active.
Fun with Tree Behaviour in CakePHP
I had a play with the Tree Behaviour in CakePHP and was very impressed at what you could create with such ease.
Attach Comments to Any Model in CakePHP
This method of linking models allows you to have a single table of data, say Comment, that is related to any one of a number of other Models (eg: Post, Event).
