Marissa Wells

Blog

Simple PHP Solutions: Part 1: Using Switch, If, Echo, and Variables to Create a Single File Site

Tuesday, May 12th, 2009 @ 10:30 am

At a loss for what to write about in this blog, I asked my web-savvy friends what they’d like to learn from me. I received a number of useful suggestions, but today I’m going to address Nichole’s request:

I don’t know PHP … and I think an intro post would be nice and helpful. Especially if you can include ways on how beginners can use it in their sites. :)

So this entry is the beginning of a new series: Simple PHP Solutions. In this series, I’m going to attempt to explain some very basic PHP techniques to enhance your web sites, using practical examples. I hope that I can do this in simple terms — otherwise, why not leave this to the countless other PHP tutorials and books out there? In other words, I’d like to differentiate this series by (a) using examples that I think you could make use of, and (b) explaining these examples in the simplest terms possible, so that people without previous coding experience can figure out what I’m talking about.

For today’s Simple PHP Solutions, I’m going to use the PHP tags Switch, If, Echo, and variables to create web site from one PHP/HTML file. Of course, you can (and hopefully will) spice up your site with external CSS files, maybe some images and JavaScript, etc, but the point here is that the content of the site will be entirely contained within one file.

(more…)

My CSS Habits

Monday, February 16th, 2009 @ 1:37 pm

Ever since I discovered Eric Meyer’s Reset, I’ve been a happy CSSer. The old * selector method of resetting browser defaults was always a pain in the butt, especially with forms. I realize that there are now other methods out there for resets, particularly YUI, but I have a soft spot in my heart for Meyer’s version. It’s simple, it’s clean, and it works.

I should note that since the original Reset came out, Meyer has also released Reset Reloaded and Resetting Again. If you’re wondering why you’d even bother, check out the article entitled Reset Reasoning.

Every project I’ve done in the last few years has started with a reset stylesheet. Beyond that, my habits have sort of evolved over the years.

(more…)

Recent Posts

Twitter Activity

  • I am officially totally behind on Twitter. 1 hr ago
  • Absolutely stunning day in Seattle. So glad I got out and walked around downtown, and I got some fruit at Pike Place too! 3 days ago
  • Dreamhost has screwed up one too many times with my work site. I'm tempted to cut all ties with them now. 5 days ago
  • More updates...