Categories
PHP

Firebird: Connect, Insert and Fetch Data

Learn how to access data in Firebird from PHP.

Categories
PHP

Microsoft SQL Server

Learn how to access data in Microsoft SQL Server from PHP.

Categories
PHP

Using Oracle

This tutorial covers the essentials you need to know to use Oracle with PHP.

Categories
PHP

How to use PostgreSQL

PHP supports PostgreSQL, the pg_connect() function is used to connect to a PostgreSQL database server. Once a connection has been established, SQL commands can be executed with the pg_query() function.

Categories
PHP

How to use MySQLi

PHP allows developers to interact with databases in two ways: MySQLi (MySQL Improved) extension and PDO (PHP Data Objects) extension. In this tutorial we’ll discuss the MySQLi extension which provides both speed and feature benefits over the PDO version and is a good choice for MySQL (or MariaDB) specific development projects.

Categories
PHP

Configuring Sessions in PHP.INI

The configuration of PHP’s session mechanism is completely triggered in the [session] section of the php.ini configuration file. The default settings might not be suitable for all applications, so the next few codes cover some possible configurations.

Categories
PHP

Sessions Garbage Collection

How to configure PHP’s Garbage collection mechanism to remove old/expired sessions from the server.

Categories
PHP

HTTP Authentication with Sessions

The HTTP provides two methods of authentication: basic and digest. In this tutorial, we’ll discuss only “Basic” authentication method and use this method in conjunction with PHP sessions.

Categories
PHP

Creating a Secured Members Area with Sessions

Sessions are a great way to secure certain parts of your website. In this tutorial, we create a PHP script that checks the site users, redirects unauthenticated users to the login page, and after a successful authentication sends them back to the page where they came from.

Categories
PHP

Storing Sessions in Database

By default, sessions are read from files, you can use the session_set_save_handler() function to define custom session handlers to store session data in a database. In this tutorial, we’ll create two code snippets, Procedural and OOP, to manage session data.