Fork me on GitHub

Tag: class

Tag Archives: class

File upload class – it is fixed!

After a long time of knowing there was an issue with the script I finally got around to checking it out. Its a little embarrassing to say, but, here’s the dish: I wrote all the functionality to check the file type, but forgot to actually implement it… oops. The file is correct now, so to […]

August 30, 2007 | PHP Scripting | Comments Off on File upload class – it is fixed!

Classes for file uploading in PHP

Surprisingly, I still get a lot of referrals from The Stickman for his work on a multi-file javascript upload helper on which I briefly assisted on Safari compatibility. The script adds and removes file upload form elements as requested by the user. So a form can be designed to handle as many uploads as you’d […]

December 22, 2006 | PHP Scripting | 45 comments

mySQL Class Updated for PHP 5 part 1

I’ve updated the SQL class to use some native PHP 5, namely constructors and destructors and include some backward compatibility so PHP 4 does not freak out when it loads the class. I’ll hopefully be making this 100% PHP 5 native soon enough as I’ll actually have a native PHP 5 environment to apply it […]

March 6, 2006 | PHP Scripting | Comments Off on mySQL Class Updated for PHP 5 part 1

mySQL Class Updated

The change is minor but has significant meaning to the script. I added two functions – escapeData() and buildQuery(). The significance of adding these is mainly in the escapeData() function. Instead of encouraging the user the use addslashes before using submitted data or, worse yet, encouraging the user to rely on magic_quotes, the escapeData function […]

September 12, 2005 | PHP Scripting | 7 comments

Basic Emailer Class

So, I ended up on a project that required a lot of mail notifications to be sent so I went ahead and whipped up a class for sending emails via PHP. They didn’t have to be pretty to start off with so this is merely a plain text email class at the moment. HTML and […]

July 14, 2005 | PHP Scripting | Comments Off on Basic Emailer Class

MySQL Abstraction update…

Yep, the script needed updating already. I left out a routine in the arrayAssoc and arrayNum functions to account for an empty result set. So if you’ve downloaded it, grab this new version here. Did anyone actually download and use the first one?

June 24, 2005 | PHP Scripting | 3 comments

More gettin’ my OOP on: Aggregation

I promised myself that I’d write about something else but this has me so stoked that I just can’t keep it in. One of my biggest problems with getting into large PHP application programming with OOP was the sharing of functions. Inheritance just wasn’t doing it the way I wanted it to. I knew it […]

June 21, 2005 | PHP Scripting | 3 comments

My MySQL Abstraction Class

We all do it, and its a foundation of providing dynamic web content. The database call is almost everywhere now as dynamic pages are becoming the norm and not the exception. More and more I’m making database calls and my old class just wasn’t cutting it anymore.

June 17, 2005 | PHP Scripting | 7 comments