An alternative to using a database to store data is to use what are known as flat files. These are basically text files that are stored on your server that you can use to store your data, change, manipulate and generally use how you want.
PHP form Introduction PHP / Forms
This article demonstrates how to use PHP forms. You will find detailed information from the form basics to advanced form processing.
Introduction to SQLite PHP / Databases
Many people have heard of SQLite but not many people have used it in their PHP applications. Most PHP applications make use of the MySQL database engine to store information however this is not always needed for small amounts of data. In these cases, web applications often store their data in a "flat file" format, often just a plain text file or an XML file. Both of these methods have their downsides.
Writing to a file PHP / File Operations
In php we use the fwrite function to write data to a file, this takes 2 parameters. The first parameter is the file handle which we specified in our Creating a file tutorial, the second is the actual data we wish to write to the file.
Opening a file in PHP PHP / File Operations
When you open a file in PHP one of the first things you have to think about is what mode do you wish to open the file, Do you want to create a new file, Do you wish to open an existing file and add more data or do you wish to read data from an existing file. Some of the most common modes are displayed below.
Working with Directories and Files PHP / File Operations
A collection of 8 tips on PHP functions for working with file systems:
1. How To Create a Directory?
2. How To Remove an Empty Directory?
3. How To Remove a File?
4. How To Copy a File?
5. How To Dump the Contents of a Directory into an Array?
6. How To Read a Directory One Entry at a Time?
7. How To Get the Directory Name out of a File Path Name?
8. How To Break a File Path Name into Parts?
Upload and Rename File PHP / File Operations
This tutorial show you how to rename file when upload file to server to prevent new file overwrite an old file that exists in you server.
Using Files on the Server File System PHP / File Operations
Although databases are very common, using the file system to store data can be a real alternative. Often, it is easier to implement that way. Sometimes, it is faster, and much more importantly, all hosting providers have file access enabled, whereas database support might only be available at extra cost.
Secure File Upload with PHP PHP / File Operations
PHP makes uploading files easy. You can upload any type of file to your Web server. But with ease comes danger and you should be careful when allowing file uploads.In spite of security issues that should be addressed before enabling file uploads, the actual mechanisms to allow this are straight forward. In this tutorial we will consider how to upload files to some directory on your Web server. We will also discuss security issues concerned with the file uploading.
Introduction to SWF and Flash PHP / Miscellaneous
SWF is the file format used by Macromedia Flash to deliver graphics, animation and sound to users on the Internet. Flash enables you to provide a very rich and dynamic interface to the user. Almost 90% of web users can view SWF content without having to install a browser based plug-in, and over 200 million people have downloaded the Flash player.
Creating a file based logging script PHP / Site Analysis
In this tutorial I will show you how you can create a small and simple PHP script to log your visitors activity into a file. You just need to add 1 line to each of your page to enable logging and the statistics will be collected in a html file so you don't have to setup any database for this task.
Creating a file upload system PHP / File Operations
In this tutorial I will show you how to create a simple file upload system with your user can upload a file from the local computer to your webserver. As you will see it is not so complicated to implement this very usefull script. However it can be dangerous if every visitor can upload files without any restriction. You can easy have a situation that there is no more free space on your server.