Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/pramod/public_html/blog/wp-includes/classes.php on line 576 Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/pramod/public_html/blog/wp-includes/classes.php on line 576 Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el(&$output) in /home/pramod/public_html/blog/wp-includes/classes.php on line 576 Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el(&$output) in /home/pramod/public_html/blog/wp-includes/classes.php on line 576 Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el(&$output) in /home/pramod/public_html/blog/wp-includes/classes.php on line 593 Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/pramod/public_html/blog/wp-includes/classes.php on line 687 Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/pramod/public_html/blog/wp-includes/classes.php on line 687 Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el(&$output) in /home/pramod/public_html/blog/wp-includes/classes.php on line 687 Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el(&$output) in /home/pramod/public_html/blog/wp-includes/classes.php on line 687 Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el(&$output) in /home/pramod/public_html/blog/wp-includes/classes.php on line 710 Strict Standards: Redefining already defined constructor for class wpdb in /home/pramod/public_html/blog/wp-includes/wp-db.php on line 58 Deprecated: Assigning the return value of new by reference is deprecated in /home/pramod/public_html/blog/wp-includes/cache.php on line 99 Strict Standards: Redefining already defined constructor for class WP_Object_Cache in /home/pramod/public_html/blog/wp-includes/cache.php on line 404 Deprecated: Assigning the return value of new by reference is deprecated in /home/pramod/public_html/blog/wp-includes/query.php on line 21 Deprecated: Assigning the return value of new by reference is deprecated in /home/pramod/public_html/blog/wp-includes/theme.php on line 576 Pramod Poudel’s Blog » PHP

Archive for the ‘PHP’ Category

PHP round for a number to the nearest 0.5

Tuesday, June 12th, 2012

For rating, the best solution to get the nearest 0.5 precision in PHP is round($value*2) / 2 For example: 2.2 should give 2 2.3 should give 2.5 2.25 should give 2.5

CodeIgniter Matrix table Implementation

Sunday, May 30th, 2010

This tutorial describe how to make the data row as the column in the flexigrid implementation with codeIgniter. for the view you should dispaly following code in main page: Use z-index in the case table and other entity overlap the flexigrid table and so it is invisible. You can set ...

Adding Print functionality in Flexigrid Implementation of CodeIgniter

Friday, December 18th, 2009

Add print button in flexgird grid in your Controller. You should define print css in your flexigrid css. $buttons[] = array('separator'); $buttons[] = array('Print','print','printReport'); Now, you should define printReport javascript function in end of the page of view associated with the page. New tab for print is opened with hiding unwanted css and by location.reload(); ...

Email Activation Security

Sunday, June 1st, 2008

You are using email validation with link and if you have database field like status to activate, inactivate and suspend. www.sitename.com/activation.php?id=$userid Let status 0 means inactivated, 1 means activated and 2 means suspended. You have the code like <? $id=$_GET[‘id’]; $update=”update user set status=’1’”; $qry->queryUpdate($update); ?> If user is suspended and he again type link in address ...