How to Download File using PHP/MySQLi

Submitted by nurhodelta_17 on
In my previous tutorial, I've created a Simple File Upload using PHP/MySQLi. As a follow-up, I've created another tutorial on how to create a Simple File Download. Most files can be easily download by clicking their link. However, some files cannot be downloaded by doing so. Thus, I've created this tutorial. This tutorial will not give you a good design, but will give you a good idea about the

How to Add Seconds, Minutes, Hours, Days, Months and Years to a Date in PHP

Submitted by nurhodelta_17 on
In this tutorial, I'm going to show you how to add number of seconds, minutes, hours, days, months or years using PHP. This tutorial will not give you a good design but will give you idea on the topic. Also, If you wanted to convert our output date, you may do so by visiting my previous tutorial about Converting Date Formats. Creating Form and Output Date We determine our output date by user input upon submission.

How to Set up Expiration on MySQL Row in PHP/MySQLi

Submitted by nurhodelta_17 on
This tutorial will show you how to set up expiration on mysql row in PHP/MySQLi. In this tutorial, I've set up to update the expired row but in case that you wanted to delete the row, I've added the delete code in the comment. So feel free to switch it. This tutorial also has two mysqli methods that I've included in the comments as well so you can switch between them.

Creating our Database

I've created a sample database that we are going to use in this tutorial. 1. Open phpMyAdmin. 2. Click databases, create a database and name it as "expiration". 3.

How to Set Up Expiration to Sessions using PHP

Submitted by nurhodelta_17 on
In this tutorial I'm going to show you how to set up expiration on PHP sessions. I have created a simple login in this tutorial but if you prefer, may also learn Login with Validation in my previous tutorial. This tutorial will not give you a good design but will give you an idea in setting up session and expiry in PHP.

Creating our Login Form and Login Script

First, we create our login form with the login script.

Adding and Deleting Item(s) in Array using PHP

Submitted by nurhodelta_17 on
In my previous tutorial, I've created the Basic Array Functions. To follow up the tutorials about array, I've created another which will give you knowledge on how to add and delete item/s in array. This tutorial does not include a good design but will give you idea on the topic.

Creating our Form and Script

We create our add form, delete form and our scripts in adding and deleting items. To create the page, open your HTML code editor and paste the code below after the tag.

Basic Array Functions in PHP

Submitted by nurhodelta_17 on
In this tutorial, I'm going to show you the basic functions in working with array in PHP. I'm going to post tutorials about arrays, so this tutorial is the starting line. An array is a data structure that stores one or more values into a single value. It is useful in defining large number of variables like having 50 variables. Instead of declaring 50 of them, you can store this 50 values into a single variable.

Creating our Functions

The first and last step is to create our page with our functions. I've also included in the comments the definition of each function.

Getting the Last Inserted ID in MySQL Table using PHP

Submitted by nurhodelta_17 on
In this tutorial, I'm going to show you how to get the last inserted id in our database table. In this tutorial, I have set up an Insert Form to show the id that will be inserted in our MySQL database. I've included 2 mysqli methods in this tutorial in the comments. So, feel free to switch between the two. Creating our Database First, we're going to create a database that contains our data. 1