A few thoughts on PHP

PHP is a programming langauge that runs on web servers, and can be used inside of html code to algorithmically output sections of html. It will look very familar to the C programmer, since they include any C statement you might want to use in web programming. However they've created an overall language design to make it easier to use for web programming, such as built-in strings and many string operations. Since I made a page for the Perl bulletin board I made to learn Perl, I thought I'd start a section on PHP too.
(See the php official page for detailed info.)

I liked it enough that I converted most of my webpage to use php with MYSQL to store/retrieve data. For me, the main advantages over static html are the ability to easily update by just adding data while the php takes care of the layout, and the ability to display the same data in different ways (as I do on my news page & program page.)

A Sample Image Gallery

I wrote a very simple, but still useful, PHP script for this sample. This is the first version of the gallery above. Basically what it does is display a series of image files named in the manner 1.jpg, 2.jpg, 3.jpg, ...

View the Output: I've used some of the photographs I've taken in New York City, mostly in Central Park or at the MET. There are 10 photos in all. You can navigate through them using the Previous and Next button.

Download the code in a .zip file: gallery.zip

View the code files gallery.php & photos.php: You may freely use this script on your page. To use it the webserver you're running it on must support PHP. This is pretty common now, so if you're paying for webhosting then chances are you can use this.



gallery jr+: my more advanced image gallery

goto 3DKingdoms.com