Archive for April, 2006

PHP Classes

Spurred on by Jason's plan, I thought that I would do something similar. I thought it would might be useful if I wrote a small series based upon a set plan. Maybe write up 5-10 (or more?) articles, say one a week, and hopefully get some people thinking about how they should be coding up their scripts, in terms of security, database structure and so on.

A few topics I've thought of:

  • A basic user administration program with multiple levels of access
  • A guestbook
  • Regular Expressions
  • Classes 101
  • New features in PHP 5
  • Database Structuring

2 comments April 28th, 2006

PHP Security Tips

Ilia has posted up a PDF copy of his slides used in the recent PHP|Tek conference. Its well worth a quick read over. On another note, Ilia's book on PHP security is a must have for any serious coder. It is full of useful information and my well thumbed copy has been a life saver and taught me a few things I hadn't really considered. Nice one Ilia!

1 comment April 28th, 2006

Starting up an E-Commerce Site

Quite a few of the people that read this blog are coders who work either part time, or full time, mostly from home but some in an office. However, most if not all have coded an ecommerce site, but maybe not looked at all the angles. Jason Chance is going to be looking at these concepts based upon his own experience:

I don’t want these articles to focus on what so-called “experts” say are the best practices, or what you can read in some business book you pick up at the bookstore. These articles instead will focus on my personal experience as I have worked with various companies setting up their online operations.

Add comment April 28th, 2006

Google vs Yahoo

Google is clearly the better search engine overall - I've never had a problem with it. That was until I decided to syndicate some of its news feeds. Google has taken it upon themselves to provide their newsfeeds in html format. And its not even good HTML. Each item is packed with tables, and font tags where it would be simpler to just provide these news snippets as plain text. There is more than enough allowance in the RSS 2.0 specifications to allow for images to be placed outside the description, yet they fall down on this part. You'll find images placed besides news articles that are sometimes hardly relevant.

2 comments April 27th, 2006

Problems with simple templating

Its quite common for people to have one main template, and 'include' their content into the main content area. This works well for small informational sites, where the main content is the bit that changes on each page.

You can spot these sites a mile away with their URL's all following a similar pattern:

http://www.domain.com/index.php?page=home

There's nothing wrong with this as such, however, the issue is when the input isn't validated. First, lets see the code on index.php that pulls in our main content

Continue Reading 2 comments April 21st, 2006

File Uploads

File uploads are probably one of the things that new coders get worried about, and it is actually very simple. PHP has made vast inroads into supporting file uploads, and you can upload a file with just a few small lines of code.

In this article, I'm going to go through some simple things you should consider when uploading files, and some common mistakes made.

Uploading a file

Uploading a file is very easy. You need to add two things to your form. The first is to provide the correct enctype in the form tag, and the other is to have a file select input box:

Continue Reading 3 comments April 5th, 2006


Calendar

April 2006
M T W T F S S
« Mar   May »
 12
3456789
10111213141516
17181920212223
24252627282930

Posts by Month

Posts by Category