Search Results

Preserving Line Breaks in <textarea>

By Utkarsh Patel on 06-May-09 14:28. View Comments
A common problem many first time developers come across is preserving line breaks in a textarea after a form is submitted. This article will show you how to fix this problem in PHP and JavaScript. The code can also be easily converted to any other server side language you maybe using.

CakePHP - Allow Direct Access to Files and Directories

By Walid Abdelaty on 26-Apr-09 14:54. View Comments
The CakePHP framework as you know rewrites the browser URL to a friendly CakePHP implemented URL. This friendly URL reflects the policies that CakePHP follows which is the Model, View, and Controller (MVC). Article photo

PHP Sessions: Quick Reference

By Subhas Fagu on 26-Apr-09 01:08. View Comments
Tags:
Simply put a session is a variable that lasts through-out the period of a http session. It is similar to a cookie however once the browser is closed the variable is lost. If you would like variables that that last days and months then a cookie is what you are interested in.

How to change PHP max upload file size

By Subhas Fagu on 25-Apr-09 23:56. View Comments
With all the new web apps popping up, the demand for the exchange of media such as high res photos and music clips are becoming more prominent. To accomplish this, we need to tell our webserver/PHP to allow larger than conventional upload file sizes. Traditionally, the max upload size is around 2mb, anything more will yield an error 500 due to a timeout. There are two ways (that I know of) to change the php upload limit.

How to log PHP Errors with .htaccess?

By Subhas Fagu on 25-Apr-09 22:56. View Comments
This is another article of the great .htaccess file. In this article you will find two scripts with appropriate comments to help you easily customize your PHP error log file. There is a production edition which silences all errors and then there is a development edition which shows all errors in real time as thy occur in addition to the log file.

Changing PHP Headers

By Subhas Fagu on 19-Feb-09 16:47. View Comments
Tags: ,
PHP allows you to change the header of a file or page so that it renders differently in the browser. This is VERY powerful if you know how to use it properly.

Dynamic CSS files with PHP Headers

By Subhas Fagu on 19-Feb-09 16:47. View Comments
Tags: ,
Based on the PHP headers article, lets write a simple dynamic css file that will change the background to blue if it is monday.

Creating Events in Facebook using the API

By Utkarsh Patel on 05-Feb-09 16:31. View Comments
The new Facebook API adds additional method calls that give Facebook Applications additional functionality. One such functionality is the ability to create events using the new events.create method. Although this functionality has been added to the API the supplied php5 library file does not include a function to call this method nor does the facebook wiki page on events.create make it clear how exactly to use this method. This article will show you exactly how to use events.create as there are some special requirements for this method. Article photo

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.