Confirm before Deleting post in CakePHP
In the controller, create a delete function: <?php class EmployeeController extends AppController { public function delete($id) { $this->Employee->delete($id);...
View ArticleLogin with Google in CakePHP
Implementing Google login system in your website is very easy with OAuth2 support, a simple and standard authorization method. With minimal line of PHP codes, we can acquire required user information...
View Article[RFC] PHP 5.4 Strict Error Reporting
Testing with PHP 5.4 at E_ALL produces strict warning messages such as: Strict (2048): Declaration of Product::beforeSave() should be compatible with Model::beforeSave($options = Array)...
View ArticleCakePHP 2.0 Naming Conventions
The PHP’s popular Framework has some Naming conventions that need to be followed at the time of development. Controller Conventions Controller class names are plural, CamelCased, and end in Controller...
View ArticleAdd onClick event on form input with multiple checkbox
To add a javascript onclick event on a form input with multiple checkbox, use this alternative method: $options = array(); foreach($roles as $value => $label) { $options[] = array( 'name' =>...
View Article