How to Make a Website for Beginners

Learning how to make a website may seem a bit like re-inventing the wheel however, knowing the basics of how to make a website will definitely be an asset. Even if you plan on using a free blog service such as blogger or WordPress, knowing just a little HTML and CSS will enable you to tweak your code and personalize your online presence. Or if you are like me, you can become obsessed and spend everyday and most nights in front of a computer screen trying to keep up with the never ending onslaught of new ways to build and use websites. Continue reading “How to Make a Website for Beginners”

The 301 Redirect and Why I Need One

The 301 redirect solves many problems that are associated with websites that have changed servers or changed hosting companies. The 301 redirect will … redirect… the incoming traffic to the specified web address. Pretty simple, one file takes care of the entire site however, that is not why I’ve called you here. One of the more subtle uses for the 301 redirect is to solve a not so well known SEO issue. The 301 redirect I show here is for this specific purpose. Continue reading “The 301 Redirect and Why I Need One”

Dynamically Display Images From a Directory

Here is a nifty PHP script I use on occasion. It reads a specified directory that you have populated with images, in this case .gif images then spits them out onto a nice 4 column table.

I used this for a page that displays customer logos. To add a new logo all the client has to do is size the image, make sure it’s a gif then drop it into the proper directory, done. To remove an image, just delete it from the directory. No code.

The client wanted to order 10 of the logos first and the rest alphabetically so I came up with the easiest solution I could think of witch was to put a sort on the array of file names before writing them to HTML then coming up with a file naming scheme that they could follow. I named the logos by the company name and just put a four digit number in front of the filenames they wanted to be ordered first. They started with 0010_name.gif then 0020_name.gif etc… This way if a new one came in that they wanted first they could name it 0015_name.gif.

<table cellpadding="0" cellspacing="0" border="0">
<tr>
<?
  $dir = 'path to directory';
  $dirHandle = opendir($dir);
  $image = "";
  while ($file = readdir($dirHandle)) {
    if(strpos($file, '.gif')>0) {
      $count++;
      $image[$count] = array ($file);
    }
  }
  sort($image);
  closedir($dirHandle);
  $arrays = count($image) -1;
  $loop = -1;
  $c = 0;
  while ($loop < $arrays) {
    $loop++;
    if ($c == 4) {
      echo '</tr><tr><td><img src="'.$dir.'/'.$image[$loop][0].'"></td>';
      $c = 0;
    } else {
      echo '<td><img src="'.$dir.'/'.$image[$loop][0].'"></td>';
    }
    $c++;
  }
  if ($c==1) {echo '<td colspan="3"></td>';}
  if ($c==2) {echo '<td colspan="2"></td>';}
  if ($c==3) {echo '<td></td>';}
  if ($c==4) {echo '';}
?>
</tr>
</table>

Web Designer vs. Web Developer

spy_vs_spy

For a time I was rather concerned about the semantics of the terms; who does what? Which one makes more money and what the heck do I call myself?

There is the school of thought where a web designer is the person who makes web sites and a web developer is one who does… other stuff… makes the forms go, puts your name on the pages. The web designer was the cool one, he/she knows “Flash” ooOOOoo. The developer was the other guy, down the hall, no one really knows what he does anyways so who cares. Today, neither of them have jobs unless they each learned some of what the other one did. Continue reading “Web Designer vs. Web Developer”