Category Archives: php

Automagically assign values of option tag in cakephp

To create an <option value="custom_value"> tag with custom values in cakephp, you just have to assign an associative array to option attribute of select tag like below example.
Continue reading “Automagically assign values of option tag in cakephp” »

Php simple form validation

This is a very simple validation and retains the data of the form after validation.
Continue reading “Php simple form validation” »

How to customized wordpress login in side bar of your blog

Below are the basic steps i did to tweak the wordpress login.

step 1.

I modified the sidebar.php of my theme, copied the login submit form of the original code from wp-login.php. I changed some of the classes of few of the elements so that the original style will not be affected. This is what the tweak login looks like.
Continue reading “How to customized wordpress login in side bar of your blog” »

Redirect to referer page in cakephp

If you want to redirect to referer page

$this->redirect($this->referer());

Continue reading “Redirect to referer page in cakephp” »

Adding related post thumbnail in sidebar on your wordpress blog

You have to download and install YARPP plugin first.
Continue reading “Adding related post thumbnail in sidebar on your wordpress blog” »