Archive for August, 2002

Basic rules for good PHP

Saturday, August 3rd, 2002

I really wish that someone had showed me something like this page when I was starting to learn PHP. I could have saved myself from writing a lot of really bad code.

It’s also got a really nice explanation of what changes are required of your code when register_globals is turned off. I’m slowly working through some of my old code and converting it to play nice when register_globals is turned off, and I can’t be the only one.

(I shall now return to my hidey-hole and crunch on mySQL for another week or so…)

Pre-post, but only have it show up when it’s a “current” entry.

Friday, August 2nd, 2002

(This script was originally written for Promoguy) The idea here is that you “pre-date” an entry. In Promo’s case, he wanted to be able to write up his Monday Mission the day before, but not have it show up on his blog until it was actually Monday. Here’s what you do:

Update 8/3/2002: (I’ve updated the script to a MUCH SIMPLER version thanks to PapaScott! It’ll also let you control when the post shows up to the MINUTE!)

update 8/5/02: I’ve simplified the code further… I had some silly/stupid stuff in there before…
(more…)

Related Entries

Thursday, August 1st, 2002

For MT users, you can download a Related Entries Plugin which will allow you display related entries on your individual archive page.

XML/RDF Feeds with PHP

Thursday, August 1st, 2002

Thanks to Jason, you can use PHP to parse XML/RDF feeds and display the headlines and descriptions on your site. Visit his site to download the files & see it in action!

mySQL call for help

Thursday, August 1st, 2002

Ok, I’m just about to go insane here. I’m working on a little mySQL project, and I can’t even get as far as having the “application” (such as it is at all of just a few lines at the moment) to select the database.

I’ve connected to the database fine, but when it comes time to select a database, it dies. I’ve looked everywhere, but kind figure out why it would be happening.

Anyone run into this problem before? Have any suggestions? I’ve tried multiple varations on the following code:
(more…)