Posts

Missing export as SQL format in single table in phpMyAdmin

In phpMyAdmin version 4.8.4 in wamp server export as SQL format is missing in single table but you fixed this issue to follow below steps:
Go to "C:\wamp64\apps\phpmyadmin4.8.4\libraries\classes\Display" and Edit "Export.php"Find line /* Scan for plugins */Add the following above the line:              // Export a single table if (isset($_GET['single_table'])) { $GLOBALS['single_table'] = $_GET['single_table']; }
I hope it will work for you. Thanks

Setup a Virtual Host on WAMP 3

Setting up a virtual host provides several benefits:

Virtual Hosts make URL cleanerVirtual Hosts make permissions easierSome applications require a “.” in the URL like Magento.So, let's setup a virtual host (vhost) in WAMP 3.
Step 1: Change Virtual Host Configuration File in Apache Open your Apache configuration file located in C:\wamp64\bin\apache\apache2.4.37\conf\httpd.confSearch LoadModule vhost_alias_module and un-comment the line LoadModule vhost_alias_module modules/mod_vhost_alias.soSearch Virtual Hosts and un-comment the line Include conf/extra/httpd-vhosts.confSave and close the httpd.conf fileStep 2: Update Virtual Host Configuration File Open your vhost configuration file located one directory down from the Apache configuration file directory in C:\wamp64\bin\apache\apache2.4.37\conf\extra\httpd-vhosts.confAdd the configuration for your new vhost like below #Your new site <VirtualHost *:80>   ServerName local.newsite.com   ServerAlias www.local.newsite.com   Document…

Update existing session array variable in CodeIgniter

If you want to change one or two data then need to load old session variable and add new value as per your need.

$userData    =   $this->session->userdata('frontend'); // old session array
$userData['theme']= $this->input->post('theme'); // new value
$this->session->set_userdata('frontend', $userData);

Call AJAX with select onchange using jQuery

Below is the code where you can easily understand select Tag on change with ajax request using PHP.
Replace id #theme_option with yours.

HTML Code
<select class="form-control" id="theme_option">
<option value="default">Default</option>
<option value="real-estate">Real Estate</option>
<option value="dispatching">Dispatching</option>
<option value="dental">Dental</option>
<option value="medical">Medical</option>
<option value="restaurant">Restaurant</option>
<option value="consumer-product">Consumer Product</option>
</select>

Jquery code

jQuery(document).ready(function($){
    $('#theme_option').change(function(){ $.ajax({ url: "change_theme.php", data: { "theme": $("#theme_option").val() }, type: "post", success: function(data){    window.location.reload(); } }); }); });

How to fix Login with Facebook “Error: Can’t Load URL" using hybridauth in CodeIgniter

You can fix Login with Facebook “Error: Can’t Load URL" using hybridauth in CodeIgniter by following steps:
1. Visit "http://developers.facebook.com/apps/" and select the app you wish to fix
2. Switch your Facebook app to "public" or "online
3.Click  "+ Add Product" link from left hand menu
4. Select Web and enter you site url and hit save
5. Click on Settings menu item under Facebook Login
6. Enable "Embedded Browser OAuth Login"
7. Set "Valid OAuth redirect URIs " under Products => Facebook Login tab    Like: https://www.example.com/index.php/hauth/endpoint?hauth.done=Facebook
7. Save your changes
8. Enjoy

Post custom parameters in Ajax using jQuery

Use below code as per your requirement

$.ajax({
url: "text.php",
type: "POST",
data:{ 'campaign_name': cam_name,'contacts_list':'1,2,3','group_list':'11','sms':'Hello World','speech_text':'Hi Anna, Arun this side', },
success: function(data){
alert(data);
},
error: function (jqXHR, textStatus, errorThrown){
alert('Error adding / update data');
}     
});

Redirect http to https in codeigniter

Follow below steps to redirect you non-http site to https without using .htaccess

Change Configuration: go to application/config/config.php and enable hooks to true$config['enable_hooks'] = TRUE; Create new file hooks.php if not exist other wise open file and paste code           $hook['post_controller_constructor'][] = array(                                 'function' => 'redirect_ssl',                                 'filename' => 'ssl.php',                                 'filepath' => 'hooks'                                 ); Now create a new folder hooks if not exist under application folder and then create new file ssl.php and add below code to ssl.php  <?php function redirect_ssl() {     $CI =& get_instance();     $class = $CI->router->fetch_class();     $exclude =  array('client');     if(!in_array($class,$exclude)) {       $CI->config->config['base_url'] = str_replace(…