News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
feed this:

DevShed:
Null and Empty Strings
December 03, 2008 @ 11:16:51

On DevShed today, there's a new tutorial posted looking at two things that can cause headaches for PHP developers (especially when evaluating and comparing values) - nulls and empty strings.

Anyone who has programmed for any length of time has encountered the concepts of null and empty strings. They are not the same, and confusing the two can cause some serious problems. This article deals with these concepts in the context of PHP and MySQL.

They start with a bit of a quiz before getting into how to handle them correctly - making null "safe" and working with it correctly in a MySQL context. SQL statements and table structures are included for their examples.

0 comments voice your opinion now!
null empty string tutorial mysql handle safe



NETTUTS.com:
Mimicking Apple's Address Book for the Web
December 02, 2008 @ 11:16:19

The NETTUTS blog has this new tutorial posted (including a screencast) showing how to make a web application similar to the Address Book on Apple's OS X operating system.

As we all know, WordPress is so extensive that you can use it for nearly anything. There are even articles on sites with crazy titles such as 101 alternative uses for WordPress. So I thought, hey, why not? I bet a lot of people want to create their own Web Apps, and essentially WordPress can do that for you. In this video tutorial, we're going to make an online Address Book.

Building on a WordPress base and including jQuery and a Live Search Plugin, they create the multi-pane look and feel, styled largely with CSS. The end result shows your address groups, the members of that group and the selected member's information in the far right pane.

As always, the complete source can be downloaded.

0 comments voice your opinion now!
address book apple osx tutorial wordpress livesearch plugin jquery css


DevShed:
Authentication Scripts for a User Management Application
December 02, 2008 @ 09:31:45

DevShed continues their series looking at user authentication in PHP applications with this third part of the nine part series. The focus is on the creation of the authentication scripts.

In this article we will continue to discuss the application-wide scripts that we started to talk about in the last article. These special scripts are used by all the scripts and pages of the application. We will continue to look at the func.inc script that has several useful functions defined in it.

Their func.inc script contains the helper functions the rest of the application can use (like isAdmin, isAuthd, genpass and checkEamil). They explain each of the the functions and include an example of them in action. The also include the other half of the pair - the logout script.

0 comments voice your opinion now!
user management application tutorial login logout


Rob Allen's Blog:
File uploads with Zend_Form_Element_File
December 01, 2008 @ 09:30:46

With the recent released of the 1.7 version of the Zend Framework Rob Allen wanted to post about a new form element type that integrates some much needed functionality - Zen_Form_Element_File.

Now that Zend Framework 1.7 has been released, I thought I'd take a look at the built in file upload element, Zend_Form_Element_File, and see how it can be used. This is how to use it in its most basic form.

The form in this example is similar to his previous example and the simple code is included for the form, the controller and the view.

That's all there is to it for simple uploading of forms. There are still a few fairly important bugs in the component that we'll have to wait for 1.7.2 for. Specifically the Count validator doesn't always work as you'd expect and don't use getValues() and receive() as it isn't yet clever enough to know not to call move_uploaded_file() more than once.
0 comments voice your opinion now!
file upload tutorial zendframework zendformelementfile


PHPro.org:
Calculate Friday The 13th With Datetime Class
December 01, 2008 @ 08:46:51

As an introduction to the Datetime class functionality PHP 5 has, Kevin Waterson shows how to use it to calculate the "Friday the 13th" for any year.

This class is a request from a PHPRO.ORG regular who asked for a method to calculate Friday the 13th for the next n years. The calculation itself is easy, however, it presents a good opportunity to introduce the PHP datetime class.

He points out that timestamps, because of they way integers are handled, have a somewhat limited lifespan (2038) and dates beyond that cannot be determined by the usual date functions. Instead, he shows how to set up a DateTime object, set a timezone and loop through the days to find the Fridays that land on the 13th.

0 comments voice your opinion now!
tutorial datetime class php5 friday thirteenth


KillerPHP.com:
Creating a Wordpress Theme from Scratch (Video)
November 28, 2008 @ 13:23:18

Stefan Mischook (of the KillerPHP.com site) has posted a new video tutorial about creating WordPress themes:

I just released a new video course on how to create a Wordpress theme/template from scratch. In these 12 videos, we will take someone with some beginner HTML and CSS skills through the steps needed to build a WordPress template from scratch. The videos use only a collection of freely downloadable tools that are available on Windows and Mac.

The full series will cost about $20 USD for a download or $30 USD to have the DVD shipped out to you. The videos focus on different parts of the process like making top-level navigation, setting up content areas and and creation of a custom homepage.

0 comments voice your opinion now!
wordpress theme scratch original tutorial video


Chris Hartjes' Blog:
Handling Multiple Environments In Your PHP Application
November 28, 2008 @ 12:41:24

Chris Hartjes has posted his method for creating a development setup that lets you use multiple environments with your code.

In anticipation of my talk at PHP Quebec 2009 I've been going over my slides and thinking about what I'm going to update for it. One little nugget I'd thought I'd share is one way of handling having multiple environments your code must run in.

It uses a PHP variable in the $_SERVER superglobal - a custom one, APP_ENV - set by the application and checked to ensure global options are correctly set.

0 comments voice your opinion now!
handle multiple environment application multiple tutorial


NETTUTS.com:
Building the Back-End of a Photo Site
November 27, 2008 @ 15:29:27

The NETTUTS.com site has posted the next part in their series on the creation of a photo site with PHP and jQuery. This time they focus on the backend of the application, written in PHP.

For those of you who have been following the last few screencasts, you must have noticed that each tutorial has been centered around a "photo site" theme. (See Scanning Folders With PHP, How to Dynamically Create Thumbnails, and Create a Photo-Admin Site Using PHP and jQuery. Today, we'll build the backend for a photo site. This tutorial will teach you how to add, delete, and update photos.

You can watch the screencast right in the post as well as follow along with the tutorial steps and download the source for their example.

0 comments voice your opinion now!
backend photo website tutorial download source screencast


Chris Hartjes' Blog:
Converting Legacy Apps to CakePHP, Part 1
November 27, 2008 @ 12:14:38

Chris Hartjes has started up a new series on his blog about converting legacy applications over to shiny, new CakePHP framework versions.

In my rapidly dwidling spare time I have been working on a project to convert an existing site for a legal services company over to PHP. I'm *this* close to being done, so I thought I'd share what I went through to get to where I am right now. [...] So after giving the code review I was asked to do the rewrite. The client realized that they had some serious maintenance issues on their hands and were in the process of creating a new look-and-feel for the site. Being the framework guy that I am, I indicated that porting the code over to a framework would be the best way to reduce maintenance issues going forward.

The series will document the process he followed to convert the application over. In part two he'll get into the meat of things - reworking the database structure.

0 comments voice your opinion now!
convert cakephp application legacy application tutorial series


Zend Developer Zone:
Reading Access Databases with PHP and PECL
November 26, 2008 @ 13:26:12

The Zend Developer Zone has a new tutorial posted today from Vikram Vaswani about accessing a database with the help of the MDBTools PECL extension to read from a Microsoft Access datbase.

In this article, I'll introduce you to PHP's MDBTools extension, which provides an API to programmatically read data from Microsoft Access database files. If your project involves working with such files, extracting database records either for calculations or for conversion to other formats, you'll find this extension invaluable.
He steps through the installation of the extension (via the pecl command line tool) and some sample code that grabs the tables, all of their attributes and how to select the data out from them.

0 comments voice your opinion now!
read database tutorial msaccess microsoft access pecl extension mdbtools



Community Events







Don't see your event here?
Let us know!


conference zendframework code zend job mysql PEAR cakephp release releases book security database package developer PHP5 example application ajax framework

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework