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.
 
 

-->