Preventing Multiple Submissions on the Client Side using jQuery

Do you want to prevent the user from submitting the form more than once? To prevent multiple submissions on the client side, you can just disable the submit button so a user cannot click twice. Using the jQuery code below can do the trick. Disable a button using jQuery <form class="" action="" method="post"> <h4>Please enter... » read more

How to create a Bar Chart using PHP

To create bar chart using PHP, you can use the built-in function Imagefilledrectangle() which draw a rectangle according the given x and y coordinates. The Syntax imagefilledrectangle ( resource $image , int $x1 , int $y1 , int $x2 , int $y2 , int $color ) : bool The Parameters $x1, $y1 set the top... » read more

Find Sum of N Numbers Using Recursion in Java

In this article, you’ll learn how to get the sum of n numbers using a recursion function. Recursion function is said to be calling itself over and over again in the application. By using recursive functions, we can remove the side effects of the looping structures. It is essential to define the base case or... » read more

How to draw a Pie chart using PHP

Creating an image using PHP may seem like a daunting task, but it is straightforward if you know what are you trying to draw using PHP’s GD library for images. Pie Charts in PHP To create a pie chart in PHP, create a new file piechart.php as shown below. <?php $image_width = 400; $image_height = 400;... » read more

Count Inversion in an Array using C++

The inversions of an array show; how many shifts/turns are needed to turn the array into its sorted form. Inversion Count for an array points out how nearest the array is from being sorted. If an array is already in sorted form, then count inversion 0. Count inversion shall be maximum if the sorted array... » read more

Use Cookies to Create Page Counter in PHP

In this tutorial, we are going to learn to create a simple cookie-based visitor counter. This counter will start from zero and will be incremented for each visit. For the sake of testing the code, the counter will reset after you close the browser. setcookie() defines a cookie to be sent along the rest of... » read more

Global Variable $_SERVER Explained in PHP

$_SERVER is an array containing information about server and execution environments. The array has values for headers, paths and script locations. The values are created by the web server. Let’s go through the $_SERVER array. You can see the complete list of variables in the array using the following code. List of Complete Global $_SERVER... » read more

Create a Time Sensitive Form in PHP

A time-sensitive form lets you enter and submit the information within the time limit being specified. In this tutorial, we will create a simple form that allows you to enter your name within 5 minutes of form being loaded. If you failed to do so, it would show an error message that you are too... » read more

Understand the File Upload Error Constants in PHP

Uploading files or images can be a crucial part of any web application. Let’s say you ask a user to upload his picture in jpeg or png format. So how you are going to check if the file is being uploaded successfully? What if the file was uploaded partially due to some network problem? PHP... » read more

Get vs. Post in PHP with Examples

The GET and POST are the two highly used methods in web applications where users submit information over the website. HTML forms usually have some input fields to extract valuable information from the visitors. Either you want to send this information to any other page, or database you need to specify a method which defines... » read more

Create a Feedback form using PHP

A Feedback form can be the most convenient way to understand how users feel about your products or services. The feedback or suggestion given by the end user can be of real help to improve your outcomes or the overall process. A simple feedback form in PHP Firstly, you create an HTML form to get the... » read more

Validating the checkbox in PHP

If the checkbox is checked, then the value of checkbox will be passed on the submission of the form. Otherwise, the value is empty. You can validate the value of a checkbox only after the form is being submitted. For example: <input type='checkbox' name='accept' value='1' id='checkbox' /> I accept the Terms & Conditions. Use the... » read more

Populate DataTable using DataReader in VB.NET

From this post, we will be talking about the way of populating dataTables using the DataReader in VB.NET. In this example, we’ll be using the SQLDataReader which is available in the SQLClient library. What is a DataReader? DataReader is an object that is used to fetch the data from any data source in a high-performance... » read more