The ‘PHP programming’ Archives
Posted July 14, 2006 by

PHP: Read a Browser Cookie Value

Once your web application has set a cookie in a user’s browser, it is a simple matter to retrieve that value in subsequent page requests. This tech-recipe describes reading a value from a cookie in PHP.

Category PHP programming

Posted July 14, 2006 by

PHP: Set or Create a Simple Browser Cookie with setcookie

Web applications overcome the lack of session support in the HTTP protocol primarily through the use of cookies. Transparent to the user and simple for the web developer, cookies provide the foundation of keeping up with who web a user is and where they have been.

Category PHP programming

Posted July 10, 2006 by

PHP: Rename or move a file on the server

Working with server-side files with PHP adds a great deal of flexibility to some applications. A common scenario when working with files involves creating a temporary file through uploading or other means and then renaming this file to a permanent location. This recipe describes changing the name of an existing file using the PHP function […]

Category PHP programming

Posted July 10, 2006 by

PHP: Delete or Unlink a File on the Server

PHP has the capacity to work with server-side files in many ways creating, opening, reading, and writing. When you are done with a file, it is a simple matter to delete it using a PHP script.

Category PHP programming

Posted July 10, 2006 by

Cannot modify header information – headers already sent

This error message is commonly seen by programmers starting to use PHP. Understanding why this error occurs will help find the solution.

Category PHP programming

Posted June 25, 2006 by

PHP: Password Protect Your Pages

This tutorial contains a simple PHP implementation which will prevent unwanted access to certain pages.

Category PHP programming

Posted June 25, 2006 by

PHP: Upload Files to the server

With PHP, it is simple to upload any file to your server.

Category PHP programming

Posted June 25, 2006 by

PHP: Generate Dynamic Images from Text

The following Tech-Recipes tutorial explains how to create images from text dynamically (quote generator).

Category PHP programming

Posted June 19, 2006 by

PHP: Create a File on your Server

Create an empty file on the server that can be written to.

Category PHP programming

Posted September 19, 2004 by

PHP: Break Apart Strings with explode

PHP has a built-in function knows as explode which breaks apart a string using substring separators. This tech-recipe describes the use of the explode() function.

Category PHP programming

Posted June 9, 2004 by

Redirect to another web page using PHP

Redirection from one web page to another is a handy tool. This recipe describes the syntax that causes the client to redirect to another URL.

Category PHP programming

Posted March 20, 2004 by

PHP Conditional Syntax: Using Switch and Case Statements

The switch/case statement offers similar functionality to the if/elseif statement; however, it offers a more elegant solution and has capabilities beyond the if/elseif alternative.

Category PHP programming