auto formatting excel file when download using php

I just added a blank space in front of the zip code or value, It’s working fine

Share
Posted in php | Leave a comment

hipay payment example

Hipay payment example

Hipayment not working ..

Same currency issue ,

Problem in creating dynamic button ..

At first create fix button .. Will wrote details next

 

 

Share
Posted in Hipay, Payment | Leave a comment

header already sent warning in wordpress

header already sent warning in wordpress plugin development

Recently i faced problem with redirecting in plugin development when i saved data in database and thinking to redirect in listing page. I spent a lot of time to find out the solution. Finally i solved it using javascript.

 

<script>location.href=”<?php echo $location?>”;
</script>

Share
Posted in Wordpress | Leave a comment

how to get last insert id in wordpress

last insert id in wordpress

global $wpdb;
$table_name = $wpdb->prefix . “table_name”;
$wpdb->query(“INSERT INTO $table_name ( id, ……

$id = $wpdb->insert_id ;

 

 

 

Share
Posted in Wordpress | Leave a comment

how to remove top bar from my pages in wordpress

how to remove top bar from my pages in wordpress

Just use the following line to functions.php in your theme.


add_filter( 'show_admin_bar', '__return_false' );

To functions.php in your theme.

Share
Posted in Wordpress | 1 Comment

How to get current wordpress theme directly from database

How to get current wordpress theme directly from database

SELECT * FROM wp_options WHERE option_name = ‘template’ OR option_name = ‘stylesheet’ OR option_name = ‘current_theme’

 

 

How to get current wordpress theme directly from database

Share
Posted in Wordpress | Leave a comment

how to move column position in mysql

I solved it with the following query

ALTER TABLE users MODIFY username VARCHAR(200) AFTER id

 

column position change in mysql

Share
Posted in mysql | Leave a comment

mysql query for updating one table column into another table

mysql update from another table
Today i faced on of my history table which contains old data to update with updated image name from another table. Here is the solution how i fix it.

UPDATE candidates a, candidates_cache b

SET b.pos1_candidate_image= a.image

WHERE b.pos1_candidate_id = a.id

Share
Posted in mysql | 1 Comment

cakephp session reset in firefox

$this->Session->read() is not working in firefox
Cakephp session is not working in firefox

CakePHP session error : User-Agent must be consistent

Today i faced some problem working with sesison in cakephp. Cakephp session is reseting again and again. After spending a lot’s of time i found the following solution.
This type of error may occur for different user agent

I change the following setting in cakephp core.php file

Configure::write(‘Session.checkAgent’, false);

Also you can increase the session life time

session reset in firefox in cakephp

Share
Posted in Cakephp | Leave a comment

return json data in cakephp

json in cakephp
generate json in cakephp view page

You want to return json from your cakephp appliaction ?? Just use the following line

Configure::write(‘debug’, 0);
echo $javascript->object($result);

Here $result is the array (single , multidimensional ) which you want in json format.

Share
Posted in Cakephp | Tagged | Leave a comment