Wednesday, January 1, 2014

Validate required field in php or server side validation in php if javascript failed by client side


//add this function on function.php or other give other file name you are including on php page

function checkRequiredPost($requiredField) {
    $numRequired = count($requiredField);
    $keys        = array_keys($_POST);
    $allFieldExist  = true;
   
    foreach($requiredField as $reqr)
   
    {
        if($_POST[trim($reqr)]==''){$allFieldExist=false;break;}
    }
   
    return $allFieldExist;
}


// use below code before insert/update  query

$required=array('txt_name','txt_password'); // add fields name you want to mandatory them like name,password etc.

if(isset($_POST['submit']) && checkRequiredPost($required))

{
 ////type your code or insert/update query

}


Friday, December 27, 2013

WRITE PHP CODE IN CKEDITOR SORCE CODE AND FETCH IT ON USER PANEL (FRONT END)

You want to fetch news or other records records in front end(user panel)

                                                       
                                                    while($res=mysql_fetch_array($
qry))    {
                                                    echo ''.  $res['headline'].'....

';
                                                    } ?>




/*write php code in ckeditor use below script on page where you use ckeditor after textarea control*/
   */
            CKEDITOR.replace( 'editor1',
    {
        filebrowserUploadUrl : 'http://127.0.0.1/Hope/admin/images/upload.php'
        //filebrowserUploadUrl : 'http://127.0.0.1/Hope/admin/images/upload.php'
    });

           
-->

//for fetching records to userpanel page  use eval function with below  type or example.

 echo eval('?>' . utf8_encode($rst['content']) . ' //echo $rst['content'];
 

 ?>
 ---------------------------------------

Friday, December 13, 2013

Insert hindi text to mysql database

1. open phpmyadmin
2. Click on SQL tab or select any database name then 
Click on SQL tab
3. copy below sql query one by one and paste in SQL body  
 
mysql_query('SET character_set_results=utf8');

mysql_query('SET names=utf8');
mysql_query('SET character_set_client=utf8');

mysql_query('SET character_set_connection=utf8');
mysql_query('SET character_set_results=utf8');

mysql_query('SET collation_connection=utf8_general_ci');
 
 
 
 
 
 
 
 
 
 
 
4. And click on GO Button to execute above query.
 
 

-->

Saturday, May 5, 2012

How to rename the WordPress wp-admin folder to New Name like sitehandler


step1. Install first wordpress with proper database name and login. you can login in admin area using http://127.0.0.1/your_word_press_folder(site)_name/wp-admin

you can change wp-admin name to other any name like sitehandler


step2. Open wordpress or site folder and select only all php files and open in dreamweaver after this open find and replace dialoge(ctrl+f) type in find wp-admin and  in replace type sitehandler(or other name as you wish) select find in open documents(changes only opened document) and click on replace all after this save all document in file menu and press ctrl+shift+w


step3.
open wp-includes folder and select only all Php files and find and replace wp-admin with sitehandler
           and save all files and close all files using ctrl+shift+w.

step4. open wp-includes/css , wp-includes/js, wp-includes/pomo, wp-includes/Text, wp-includes/theme-compat all php files and find and replace wp-admin with sitehandler
and save all files and close all files using ctrl+shift+w.

step5.  open all files of wp-content folder and find and replace wp-admin with sitehandler and save all files and close all files using ctrl+shift+w.

step6.  open all files of wp-admin folder and select and open  all php files find and replace wp-admin with sitehandler and save all files and close all files using ctrl+shift+w.

step7. open all folders(css, includes, js, maint, network, user) of wp-admin and open  all php files find and replace wp-admin with sitehandler and save all files and close all files using ctrl+shift+w.

step8.  rename wp-admin/css css files naming wp-admin.css-->sitehandler.css, wp-admin.dev.css -->sitehandler.dev.css, wp-admin-rtl.css-->sitehandler-rtl.css, wp-admin-rtl.dev.css-->sitehandler-rtl.dev.css

step9. change wp-admin folder name to sitehandler

step10. change file name class-wp-admin-bar.php to class-sitehandler-bar.php in wp-includes folder.

Tuesday, March 16, 2010

Connect internet using Reliance datacard in Windows7


1. First Connect Your Reliance Data card to PC (USB Port) & install the modem(Software).
2. After installing Software use the following step
a) Open Control Panel-> Click on 'switch the classic view. b) or directly open Network Connection and click on create a new connection.
3. After this use the following method.













4. After this connect to Reliance 2 and click on dial & enjoy............................

Monday, October 19, 2009

how to insert image/photo/graphics in message text body

if you don't want to attach a image file(jpeg,gif,bmp etc.) in your mail(text body).
Then you can paste your image in text body without any attachment. copy paste process is given below.

1. Right click on image file
2. choose open with internet explorer.
3. or Choose program... then choose internet explorer.
4. Press enter key or click on ok button.
5. In internet explorer(browser window) right click on image and copy image.
6. after this paste image in your(Gmail, Yahoo etc.) mail box tex body.
7. Do practical right now and send mail without image attachement.

Saturday, April 18, 2009

create strong password for Microsoft Windows



Rules 1. Mininimum Password length=10 Character And Maximum Password length= >15 character


Rules 2. Special Character must be used in urs password. the list of special characters are given above, to see the clear image, click on it. how to type special characters in urs password the key is given,other than show on urs keyboard.

Eg.
Type any keyboard character(or special character) and press Alt+178(after pressing Alt key, numbers type only from num pad and numbers given by you like as above figure) this special character is typed ▓
if you are giving these characters in yours password then anybody can't guess or decrypt urs password easily. so be secure for give a password.