PHP Tutorials
Saving PHP Session Data to a Database
As you should be aware the HTTP protocol, as used for serving web pages, is completely stateless. This means that after the server has received a request, processed it and sent a response, the process which dealt with that request dies. Anything that the process had in its memory therefore dies with it, so when a subsequent request is received from the same client it is unable to refer to its memory about anything that happened previously.
As you should be aware the HTTP protocol, as used for serving web pages, is completely stateless. This means that after the server has received a request, processed it and sent a response, the process which dealt with that request dies. Anything that the process had in its memory therefore dies with it, so when a subsequent request is received from the same client it is unable to refer to its memory about anything that happened previously.
How to Handle a Many-to-Many Relationship with PHP and MySQL
This tutorial is intended for those developers who come across the situation where they need to cater for what is known as a 'many-to-many' relationship. It will explain how to generate the database tables to deal with such a relationship, and how to design HTML forms to display and update the contents of these tables.
This tutorial is intended for those developers who come across the situation where they need to cater for what is known as a 'many-to-many' relationship. It will explain how to generate the database tables to deal with such a relationship, and how to design HTML forms to display and update the contents of these tables.
Customizing the PHP Error Handler
This tutorial is intended for the novice or intermediate PHP programmer. Basic knowledge of creating and using functions is assumed.One of the last areas that developers seem to deal with in their code is error handling.
This tutorial is intended for the novice or intermediate PHP programmer. Basic knowledge of creating and using functions is assumed.One of the last areas that developers seem to deal with in their code is error handling.
A Reversible Encryption Routine for PHP
This tutorial is intended for those PHP developers who want a password encryption routine that is reversible - i.e. the encrypted password can be decrypted back into plain text. The reason for wanting such a routine could be that your web hosting service does not include an acceptable encryption module in his PHP build, or perhaps you want a routine that allows a certain amount of customisation that makes it totally different from the encryption routines used by others.
This tutorial is intended for those PHP developers who want a password encryption routine that is reversible - i.e. the encrypted password can be decrypted back into plain text. The reason for wanting such a routine could be that your web hosting service does not include an acceptable encryption module in his PHP build, or perhaps you want a routine that allows a certain amount of customisation that makes it totally different from the encryption routines used by others.
A Class for Validating and Formatting Dates
This tutorial is intended for developers who want to take a user-supplied date and format it so that it can be added to the database, and then to take a date from the database and format for display to the user.
This tutorial is intended for developers who want to take a user-supplied date and format it so that it can be added to the database, and then to take a date from the database and format for display to the user.
Sorting an Array in PHP
Now and then you need to sort your arrays alphabetically or numerically, if nothing else, then just to apply some programming logic and attain the desired output. You can sort an array in PHP by using two functions...
Now and then you need to sort your arrays alphabetically or numerically, if nothing else, then just to apply some programming logic and attain the desired output. You can sort an array in PHP by using two functions...
Setting Up Apache, PHP & MySQL On Windows
I'm writing this article assuming you're running Windows XP on your computer. Even if you are not, you can use this article to setup these three on almost all basic Windows flavors.
I'm writing this article assuming you're running Windows XP on your computer. Even if you are not, you can use this article to setup these three on almost all basic Windows flavors.
Programmatically Deciding Which Database to Connect in PHP
Most of the time, while working with PHP and MySQL, we have to switch between the local PC and the remote server. To connect to a database, I often used the following function...
Most of the time, while working with PHP and MySQL, we have to switch between the local PC and the remote server. To connect to a database, I often used the following function...
PHP Time and Date
Dates are very simple in PHP and are easy to get the hang on but not so easy to remember all the variables to the dates as you will see further on in this tutorial.
Dates are very simple in PHP and are easy to get the hang on but not so easy to remember all the variables to the dates as you will see further on in this tutorial.
Adding records to a MySQL database using PHP
There comes time when your website tends to transcend the boundaries of mere brochure type looks. There is a need to interact, to seem dynamic, and to respond according to your visitor's behavior. You also want your visitors to go through a list of offerings that run into hundreds. Creating hundreds of web pages having a uniform layout for hundreds of products can become an overwhelming task.
There comes time when your website tends to transcend the boundaries of mere brochure type looks. There is a need to interact, to seem dynamic, and to respond according to your visitor's behavior. You also want your visitors to go through a list of offerings that run into hundreds. Creating hundreds of web pages having a uniform layout for hundreds of products can become an overwhelming task.
