Internet Banking – The Pros And Cons Explained

Explore the advantages and disadvantages of internet banking, including convenience, mobility, better rates, and potential security concerns.

Over the last decade, millions of people in India have adopted online banking as their preferred method of conducting financial transactions. This way of banking has become quite popular because to the convenience with which one can monitor their account, make payments online, and transfer money between accounts. This is especially true for Indians who are always pressed for time to physically visit the bank.

Online banking also has several non-transactional functions that are very useful. Despite its convenience, however, this way of banking has a few drawbacks. These must be understood to secure your funds and avoid issues in the future.

Key Benefits of Internet Banking

Customers who choose internet banking over traditional branch office visits are eligible for different benefits.

Services

Technology has made it extremely simple for both the bank and the customer to access many services online. Financial planning capabilities, functional budgeting and forecasting tools, loan calculators, investment analysis tools, and equity trading platforms are among the services provided. These are available on the bank’s website as simple applications. Furthermore, most banks offer online tax forms and tax preparation services.

Convenience

Convinience is the most promising advantage that outweighs any shortcomings of internet banking. Making transactions and payments at the click of a button from the comfort of your own home or office is a convenience that no one wants to give up. Keeping track of your accounts via the internet is becoming faster and more convenient than going to the bank. Even non-transactional services, such as ordering cheque-books online, updating accounts, enquiring about interest rates on various financial products, and so on, are much easier to access via the internet.

Mobility 

In recent years, internet banking has taken a stride forward with the evolution of mobile internet banking. Internet banking provides the consumer with unrestricted mobility, allowing you to conduct financial transactions even when on the move.

Another significant advantage of internet banking is that it is environmentally friendly. It saves paper and reduces pollution by eliminating the need for individuals to travel physically and emitting no emissions.

Better Rates

Banks stand to benefit from the adoption of internet banking because it requires less physical effort on their part. The requirement to expand office space and hire more employees to deal with clients is reduced drastically. The banks benefit financially as a result of this. Also, a part of the savings can be passed on to consumers by higher deposit rates and lower lending rates. To encourage internet banking, most banks provide no-deposit or low-deposit accounts. They also have reduced penalties for taking money out of Fixed Deposits early.

Drawbacks of Internet Banking

However, the current trend of exclusively using the online mode has a few pitfalls. This may prove costly in the long run unless guarded against from the beginning.

Security

Security is the most serious flaw in the internet banking method, and you must avoid it at all costs. Even though your account is protected by a variety of sophisticated encryption technologies, there is always the risk of hacking by criminal forces in the cyber world.

On the internet, hacker attacks, phishing, malware, and other forms of unauthorized behaviour are all too frequent. If you only use the internet for banking, identity theft is another major risk. To combat identity theft, most banks have made it essential to post scanned copies of approved checks online. When creating an account and before using online banking services, you should review the bank’s security rules and precautions.

Online banking is a significant move in the right direction as far as the convenience of the customer as well as the banker is concerned. But it must be applied with adequate precaution to avoid falling prey to unscrupulous elements scouring the internet.

Relationships

Online transactions take a toll on the relationship with the banker which the traditional visit to the branch office used to foster. Personal relationships with the staff at the banks come in handy when requesting faster loan approvals or a special service which may no longer be available to the public. The manager has many discretionary powers. These include waiving penal interest or service fees. Additionally, personal contact also meant that the banker would provide essential financial advice and insights which are beneficial to the customer.

Complex Transactions

There are many complex transactions which cannot be sorted out unless there is a face to face discussion with the manager. This is not possible through internet banking. Solving specific issues and complaints requires a physical visit to the bank and cannot be achieved through the internet. Online communication is neither clear nor specific enough to help resolve many complex service issues. Certain services such as notarisation and bank signature guarantees cannot be accomplished online.

Get Last Executed Query in CodeIgniter PHP

Learn how to retrieve the last executed query in CodeIgniter’s built-in query methods developed in PHP. Helpful for debugging and query optimization.

When developing applications with CodeIgniter, retrieving the last executed SQL query becomes the most useful features for debugging and performance tuning. Whether you’re trying to diagnose a bug, optimize performance, or log queries for later review, CodeIgniter makes it easy to access the most recent database query.

In this article, we’ll explore how to get the last executed query in both CodeIgniter 3 and CodeIgniter 4, with examples.

Why Retrieve the Last Executed Query?

Here are a few scenarios where getting the last executed query is helpful:

  • Debugging incorrect or unexpected results.
  • Profiling SQL performance issues.
  • Logging queries for auditing purposes.
  • Building custom query logs for admin or developer panels.

CodeIgniter 3: Getting the Last Query

CodeIgniter 3 provides a simple method from the database class:

$this->db->last_query();

For Example:

public function getUser($id)
{
    $query = $this->db->get_where('users', ['id' => $id]);
    echo $this->db->last_query(); // Outputs the SQL query
    return $query->row();
}

Output:

SELECT * FROM `users` WHERE `id` = '1'

You can also store it in a variable to use it for logging:

$last_query = $this->db->last_query();
log_message('debug', 'Last Query: ' . $last_query);

CodeIgniter 4: Getting the Last Query

In CodeIgniter 4, the approach is slightly different. You can use the getLastQuery() method from the Query Builder object.

Example:

$db = \Config\Database::connect();
$builder = $db->table('users');

$query = $builder->where('id', 1)->get();
echo $db->getLastQuery(); // Outputs the last SQL query

Output:

SELECT * FROM `users` WHERE `id` = 1

getLastQuery() returns a CodeIgniter\Database\Query object, so you can also format it if needed:

echo $db->getLastQuery()->getQuery(); // returns query string

Pro Tips

  • Use this feature only in development mode or behind admin-only views.
  • Avoid exposing raw SQL queries in production environments for security reasons.
  • Combine it with CodeIgniter\Debug\Toolbar for enhanced SQL visibility in CI4.

Logging All Queries in CodeIgniter

You can also log all database queries automatically:

CodeIgniter 3:

In application/config/database.php, set:

$db['default']['save_queries'] = TRUE;

Then access them:

print_r($this->db->queries); // array of all executed queries

CodeIgniter 4:

Use the Debug Toolbar, or manually:

$db = \Config\Database::connect();
$queries = $db->getQueries(); //returns an array of all queries

Conclusion

Accessing the last executed SQL query is a powerful feature that can significantly speed up debugging and development. Whether you’re using CodeIgniter 3 or 4, the framework provides convenient tools to track your database interactions.

Make sure to leverage this feature wisely, especially when you’re optimizing queries or tracking down elusive bugs.

Do you use query logging in your CodeIgniter project? Share your tips or challenges in the comments below!

How to Redirect HTTP to HTTPS Using .htaccess

Secure your website by redirecting all HTTP traffic to HTTPS using a simple .htaccess rule. Follow this guide for a safe and SEO-friendly setup.

Chrome and Firefox have started showing insecure warnings to the visitors on websites without SSL certificates. Therefore, using an SSL-encrypted connection for safety, accessibility or PCI compliance reasons is necessary. For SSL-encryption, buy SSL certificates and install them to your websites.

But, installing SSL certificates will not show secure, you should also redirect all your HTTP traffic to HTTPS. In order to force your web traffic to use HTTPS, edit the codes in the .htaccess file. Before we move onto redirecting HTTP to HTTPS, here’s how you can edit .htaccess file. If you already know skip to Redirection steps.

Editing .htaccess File

There are instructions/directives in the .htaccess file that tell the server how to act in certain scenarios and directly affects how your website functions. Common directives in .htaccess file:

  • Redirects
  • Rewriting URLs

Ways to edit an .htaccess file:

  1. Edit the file on your computer and upload it to the server using FTP.
  2. Use “Edit” mode in FTP program that allows you to edit a file remotely.
  3. Use a text editor and SSH to edit the file.
  4. Use the File Manager in cPanel to edit the file.

Editing .htaccess in cPanel File Manager

Note: Backup your website in case something goes wrong.

  1. Login to cPanel
  2. Files > File Manager > Document Root for:
  3. Now select the domain name you want to access
  4. Check “Show Hidden Files (dotfiles)”
  5. Click “Go”
  6. After a new tab or window opens, look for the .htaccess file.
  7. Right click on the .htaccess file and click on “Code Edit” on the menu.
  8. A dialogue box may pop up asking about encoding. Click “Edit” button to continue.
  9. Edit the file
  10. “Save Changes” when done.
  11. Test your website to make sure it is done correctly. In case, there is an error, restore to the previous version and try again.
  12. Once you are done, click “Close” to close the window.

Redirecting HTTP to HTTPS

1. Redirect All Web Traffic

If you have existing code in your .htaccess, add the following:

RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]

2. Redirect Only a Specific Domain

For redirecting a specific domain to use HTTPS, add the following:

RewriteEngine On RewriteCond %{HTTP_HOST} ^yourdomain\.com [NC]RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]

3. Redirect Only a Specific Folder

Redirecting to HTTPS on a specific folder, add the following:

RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} folder RewriteRule ^(.*)$ https://www.yourdomain.com/folder/$1 [R,L]

Note: Replace “yourdomain” with your actual domain name wherever required. Also, in case of the folder, replace /folder with the actual folder name.

Think it was useful? Share this article to help them come on HTTPS

How to Autostart GlassFish Server on Ubuntu Startup

Learn how to configure GlassFish Server to start automatically on system boot in Ubuntu. Step-by-step guide using systemd service scripts.

If you want GlassFish Server to launch automatically when your Ubuntu system boots, you can easily achieve that by creating an init script. This allows you to manage GlassFish’s start, stop, and restart actions seamlessly.

In this article, we learn to create the init script for GlassFish server and how to configure it in Ubuntu systems to control GlassFish server.

Step 1: Create the Init Script

The init script file for GlassFish Server is to be created at /etc/init.d/.

For managing all GlassFish Server startup events, it ships with the asadmin tool. Use this tool in the startup script as follows,

Create GlassFish init file using the following command:

sudo nano /etc/init.d/glassfish

Paste the following lines in the file

#!/bin/sh
# Prevent potential issues by defining Java path
export AS_JAVA=/usr/lib/jvm/jdk1.8.0
GLASSFISHPATH=/home/glassfish/bin

case "$1" in
  start)
    echo "Starting GlassFish from $GLASSFISHPATH"
    sudo -u glassfish $GLASSFISHPATH/asadmin start-domain domain1
    ;;
  stop)
    echo "Stopping GlassFish from $GLASSFISHPATH"
    sudo -u glassfish $GLASSFISHPATH/asadmin stop-domain domain1
    ;;
  restart)
    $0 stop
    $0 start
    ;;
  *)
    echo "Usage: $0 {start|stop|restart}"
    exit 3
    ;;
esac

This script uses asadmin to control the domain named domain1, running it as a dedicated glassfish user for security and proper permissions.

Step 2: Make the Script Executable

Now, glassfish startup script is created. We need to add this file in startup to make Glassfish Server autostart during Ubuntu startup.

Set the appropriate permissions so the system can run it at boot:

sudo chmod a+x /etc/init.d/glassfish

Step 3: Register the Script to Run at Startup

Link it into Ubuntu’s init system to execute during startup:

sudo update-rc.d glassfish defaults

This ensures the script will be triggered automatically during system boot.

Step 4: Validate the Setup

Now, restart Ubuntu and check if it really autostart the Glassfish Server.

Step 5: Validate Manual Commands

You can also manage Glassfish Server startup events as follows,

sudo /etc/init.d/glassfish start  # Start the server
sudo /etc/init.d/glassfish stop   # Stop the server
sudo /etc/init.d/glassfish restart  # Restart the server

Conclusion

Setting up GlassFish to start automatically on boot ensures that your applications and services are always available after a system reboot—without requiring manual intervention. By creating a simple init script and registering it with Ubuntu’s startup sequence, you can streamline your server management and reduce downtime. This method is especially useful for production environments where stability and automation are critical.

If you’re using a newer Ubuntu version that defaults to systemd, consider switching to a systemd service file for even better control and logging.

Auto-Start Tomcat on Ubuntu Boot Using systemd

Learn how to configure Apache Tomcat to start automatically on system boot in Ubuntu using systemd service units. A complete step-by-step guide.

Apache Tomcat is not configured with autostart by default in Ubuntu. So, custom init script is required to configure Tomcat for autostart on startup.

Create the init script in /etc/init.d/tomcat8 with the contents as per below.

Init script contents:

#!/bin/bash

### BEGIN INIT INFO
# Provides:        tomcat8
# Required-Start:  $network
# Required-Stop:   $network
# Default-Start:   2 3 4 5
# Default-Stop:    0 1 6
# Short-Description: Start/Stop Tomcat server
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin

start() {
 sh {tomcat_root}/bin/startup.sh
}

stop() {
 sh {tomcat_root}/bin/shutdown.sh
}

case $1 in
  start|stop) $1;;
  restart) stop; start;;
  *) echo "Run as $0 <start|stop|restart>"; exit 1;;
esac

Note: Please change {tomcat_root} with your Tomcat installation folder path.

Change its permissions and add the correct symlinks automatically:

chmod 755 /etc/init.d/tomcat8
update-rc.d tomcat8 defaults

And from now on it will be automatically started and shut down upon entering the appropriate run levels.

It could be also controlled with just use following commands like Apache

service tomcat8 <stop|start|restart>

Using above process any server script can be created and configured to start on startup.