The last variation that we will consider is email with attachments. To send an email with attachment we need to use the multipart/mixed MIM...
Sending HTML Email Using PHP
The next step is to examine how to send HTML email. However, some mail clients cannot understand HTML emails. Therefore it is best to send ...
Sending a Simple Text Email
At first let's consider how to send a simple text email messages. PHP includes the mail() function for sending email, which takes thr...
Record locking in Web applications
Record locking is used for preventing simultaneous update of the same data and therefore avoiding inconsistent results. A locked record mea...
Creating Word, Excel and CSV files with PHP
Browsing the World Wide Web you can find out various methods of creating files with PHP. In this article we demonstrate several ways to cre...
Debugging PHP with Xdebug
The Xdebug is the extension for PHP that helps debugging PHP scripts by providing a lot of valuable debug information. The debug informatio...
Reading the "clean" text from PDF with PHP
Portable Document Format (PDF) is a file format created for the document exchange. Each PDF file encapsulates a complete description of a f...
PHP: Reading the "clean" text from RTF
Rich Text Format (often abbreviated as RTF), to surprise of many, is quite complex text data format. During its long history RTF bought a l...
Reading the "clean" text from DOCX and ODT
In this article we will resolve the task of reading the “clean” text from the Office Open XML (more known as DOCX) and OpenDocument Forma...
Using Regular Expressions with PHP
Regular expressions are a powerful tool for examining and modifying text. Regular expressions themselves, with a general pattern notation a...
Create Thumbnail Images using PHP
This tutorial will describe how to create thumbnail images on the fly using PHP. Furthermore you will learn how to process a whole folder o...
PHP: Export Database Schema as XML
Sometimes it can be useful to have a dump of the current database schema. The script below reads the schema from a MySQL database and outpu...
Get the Current Page URL Using PHP
Sometimes, you might want to get the current page URL that is shown in the browser URL window. For example if you want to let your visitors...
Passing JavaScript variables to PHP
JavaScript is mainly used as a client side scripting language, while PHP is a server side technology. Unlike Java or ASP.Net, PHP doesn'...
Create CAPTCHA Protection using PHP and AJAX
CAPTCHA is a simple test to determine if a user is a computer or a human. It is used to prevent spam abuse on the websites. So if you use C...
Encrypt Passwords in the Database
If you are developing a password-protected web site, you have to make a decision about how to store user password information securely.
Blocking access to the login page after three unsuccessful login attempts
Sometimes you need to add an extra protection to password-protected website. This article explains how access to the login page can be rest...
DSN and DSN-less connections
DSN stands for 'Data Source Name'. It is an easy way to assign useful and easily rememberable names to data sources which may not b...
Connect to MS SQL Server database
Below is the code for connecting to a MSSQL Server database.
Creating New Directories
Creating new directories in PHP is accomplished using the mkdir() function, which takes two parameters. These parameters are, in order, a d...
Deleting the Directory and Its Contents
PHP has the rmdir( ) function that takes a directory name as its only parameter and will remove the specified directory from the file syste...
PHP: Working with Directories - Reading the Contents of a Directory
As is necessary for any language, PHP has a complete set of directory support functions. PHP gives you a variety of functions to read and ma...
Secure File Upload with PHP
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 whe...
Building a bar chart
In the example below, using graphic functions we will build a bar chart based on the values stored in MySQL database. In our case, values r...
Dynamic Image Generation
Creating images on the fly can be a very useful skill. PHP has some built-in image generation functions, further more, to generate new imag...
Using Cookies in PHP
A cookie is a message given to a Web browser by a Web server. The browser stores the message in a small text file that the server embeds on ...
Processing the Form Data ( PHP Code )
we are going to create our PHP file that will process the data. When you submit your HTML form PHP automatically populates two superglobal ...
Form Processing with PHP
One of the best features of PHP is possibility to respond to user queries or data submitted from HTML forms. You can process information gat...