Friday, December 25, 2009

how to set innerHTML property to select in IE

If you must use innerHTML, a workaround is to use a Div object to wrap the SELECT element and then set the innerHTML property for the Div object

http://support.microsoft.com/kb/276228

Tuesday, December 08, 2009

moving data from one mysql table to another

if u need to  copy  primary key(here id)
 INSERT INTO new_table( id,nt1,nt2) SELECT  oid,ot1,ot2 FROM old_table

else
 INSERT INTO new_table(nt1,nt2) SELECT  ot1,ot2 FROM old_table

Wednesday, October 14, 2009

Duplicate entries in Array

function dupli_val($array)
{
if ( !is_array($array) ) {
return false;
}

$repeat = array();
foreach ( $array as $key => $val ) {
end($array);
$k = key($array);
$v = current($array);

while ( $k !== $key )
{
if ( $v === $val )
{
$repeat[$key] = $v;
}
$v = prev($array);
$k = key($array);
}
}

return $repeat;
}

Sunday, October 04, 2009

Print Content in div

http://www.webdeveloper.com/forum/showthread.php?t=162079

categorising items in first letter basis

if(isset($_REQUEST["search_key"]))
$search_query="WHERE `cat_name` LIKE '".$_REQUEST["search_key"]."%' ";
else
$search_query="";

Listing Alphabets in PHP

foreach(range('A', 'Z') as $char) {
echo $char;
}
?>

Wednesday, April 22, 2009

FCK EDITOR Error:Permission denied function.mkdir

solution
Open the file fckeditor\editor\filemanager\connectors\php\config.php

Give correct value for this parameters

// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/imagesedit/' ;

// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = '/home/mysite/public_html/imagesedit' ;

Check the Folder permissions