Sort by :
Date
Rating
Editor's Pick Only
Editor's Pick in PHP Tutorials, June 2007
This Web Programming tutorial will show you how to write a PHP Thumbnail Generation Script. The author provides this article with code and a complete explanation on what it will do as a followup article to an earlier tutorial.
Editor's Pick in PHP Tutorials, June 2007
Web programmers will enjoy this article. It is a quick and effective way to create Random Password Generation - needed for security and anti-spam measures. The author provides concise lines of code, screenshots and simply read texts.
Editor's Pick in PHP Tutorials, June 2007
Who needs an Image Slideshow? You will when you see how easy it is to make and how great it looks. The author gives you code for every step so that you can set it easily into your PHP for the website design.
Now that we have our first simple class (which we build in Intro To Object: Building Your First Class) we're going to modify it a bit.
You have havent done so yet, I strongly recommend you first read my Intro To Object before starting this tutorial.
One thing you dont see too much, is tutorials on object oriented php. Now some may be familiar with object from Java and C++, and then on the other hand, many of you may have no clue what object is. For this tutorial, you need to be pretty fluent in php.
Theres two different ways this can be done. The first is by getting results from a mysql query, the second is going through the values of an array. I'll go over both. First the full files (ill break it up into two files, one using mysql, and one using an array)
The first thing we need to do is connect to the database. I always put my db connection in a universal file, that way I can just change the variables once if I need to; but for the sake of the tutorial, im putting it in this file.
The first thing we do here is echo out the html, again I wont go over this because theres really nothing to explain, except the css. We have two css classes, one for each of the alternating rows.
In the last tutorial we learned how to display the time using php. Now this is cool and all but lets get even cooler and learn how to put that time to work and display custom greeting depending on the time of day.







