Welcome to HowtoCodeStuff.com

Web Developer Journal

Working in a Git repository that has Submodule(s)

Working in a sub-module is like working in any other git repository. Any git command that you perform inside a sub-module directory are executed in the context of that sub-repository. Sub modules too can have different branches, different log history, etc separated from the parent repository. Editing the sub-module’s content and updating its repository Lets… read more »

Fixing sql_mode=only_full_group_by incompatibility error

I’ve landed on the below error while trying to load a Codeigniter web application in my local development environment. This is not an issue on the production server which runs 10.2.17-MariaDB – MariaDB Server. However my local development environment runs MySQL Server 5.7.23 on Ubuntu 18.04. To investigate, I logged into my local MySql server… read more »

Cloning a Git repository which contains Sub modules

If you are a new collaborator joining the project, you'd start by running git clone to download the contents of the repository. At this point if you peek inside the sub-module folder, you'd see nothing. Git expects us to explicitly ask it to download the sub-module's contents. You can use git submodule update –init –recursive… read more »

Installing Codeigniter on your local development environment

Click here to visit official Codeigniter download page. You should see there are several download options made available representing different Codeigniter versions. You should look for the current stable version of the framework. As of this writing, Codeigniter 3.X appears to be the current stable version. Go ahead and click the download button for Codeigniter… read more »

How to use Codeigniter Models

First lets try to get some understanding of what a Modal is and What it does? Models represents the data objects of an application. For an example in an E-Commerce site, what are the data objects that you can think of? If it is selling books, then a Book is a data object. Then there… read more »

Multiple File Upload Form

In this post I am going to show you how to create a form that allows uploading multiple files at once. There is nothing much complex about this. As you’ll see the trick is in how we configure the file upload field. Here is the html with the form: In the above markup, pay your… read more »

Formatting Currency Values

You can format any numeric value to have decimal points by the use of PHP’s number_format() function. This is ideal when you want to deal with currency values. Below I have shown an example of how this works: On line 3 we have the $price variable with its value set to 10. On line 5… read more »

Syncing an Audio Clip with Text captions

Below analysis and code sample is posted as an answer to this question posted on Facebook groups. If you go to the page http://quizresults.manifestationmiracle.net/?name=Hasan&q=aabbabc and enable its ‘view source’, you should see they are loading few javascript libraries. jquery, and jquery-ui should be familiar to most of you. They also load a jquery plugin called… read more »

Updating a MySQL table with MySQLi

Below code sample is posted as an answer to this question posted on Facebook groups. Create a new database with phpMyAdmin and execute below SQL query in its SQL tab to create a new table called ‘notes’. It will have three fields. id, title and contents. Then’ll lets populate it by adding a single record…. read more »

PHP Countdown Timer

The following php snippet can be used to display a countdown timer on a web page. First we need to start a PHP session by calling the session_start() function: Then set the default time zone for your region. I am in Sri Lanka so I set it to Asia/Colombo Now add below code block: In… read more »

Sidebar



Do NOT follow this link or you will be banned from the site!