Posts

Alternating Background Images

Today I want to show you how in just a few lines of jQuery code we can alternate or swap out the background image for any ID or CLASS.

The task of changing the CSS properties and setting a new background image is much simpler than you might expect and you may even find my method is quite a bit easier than other examples you've found. So, let's get into it shall we?

In the HEAD portion of your HTML document you'll need to include a link to the latest jQuery file. As you'll see from my example below, I'm linking to the jQuery site itself, but you could of course use Google's hosted jQuery library or even download a copy to your system and place it in a sub-folder to the site.

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>

The upside to linking to a hosted library is speed and accessibility. While you may think that having a copy of the jQuery library  on the website itself would be faster …

HTML Form Preparation

Today I want to discuss preparing the data a user would enter into one or more HTML forms you might have on your website prior to sending it off to a script for processing.

While many of these tasks could be performed on the server side within the processing script, I think it's important to get into the habit of sending the data in it's proper form & format that the script will expecting it in, especially if that data will be saved to a database.

To begin, let's take a look at a very common HTML Sign Up form...

<form action="./scripts/register.php" method="post" enctype="multipart/form-data" id="registeruser" name="registeruser">
            <fieldset class="fifty">
                <input name="First" type="text" size="10" maxlength="25" autofocus id="First" placeholder="First Name" />
            </fieldset>
            <fields…

HTML/PHP Advanced Guestbook

The single most popular post from my blog is by far the Guestbook using HTML/PHP, which for me personally seems a little odd, but apparently it's what you wanted to know about. And far be it for me to argue with what you want to learn about.

 So, with that in mind, I thought I'd revisit that topic and lend a hand at creating a much more advanced Guestbook or Online Chatting System.

 If you read the previous post, then you already know that the basic setup is to create an HTML form to allow your users to enter in their name and some comment, then we store that information into a text file called GuestBook.dat, and finally, read in that file and display it to the users.

 The original post and information there gave an example of a very basic guestbook, and was to be honest, a bit clunky.

 To get started, first create a PHP document, and then at the very top of that document add the following code:

<?php
    if (!isset($_SESSION)) { session_start(); }
    // Advanced Guestbook…

Project Planning & Web Design

Proper project planning is a must-do for any project, while failure to consider all aspects of a given project before implementation can mean certain doom.

 As an Implementation Engineer, I am very much a part of the planning phase for every project I am involved with. And as such am accustomed to planning every step as well as establishing success & failure factors. In my Website Designing business, I carry over those same principles with me because they are no less important there.

Overview

 Proper planning means to consider every aspect of a given project, including the client's needs, workflow, and customer base. In general you'll need to consider what the end result should look like, feel like, and what the success factors will be. Another words, what are you trying to accomplish and how do you calculate success or failure.

 When it comes to designing websites you may be inclined to just jump right in and start designing something based on your first client meeting o…

Form Validation Using jQuery

How many times have you sat down and designed a login form of some sort for a client only to get frustrated with it because you couldn't figure out a way to validate the information the user entered before sending it off to your script for processing?

 Well, that's about to change, because what we're going to cover today is exactly that. An easy way to validate any form input using some simple markup and jQuery.

 But before we get into the solution, let's take a look at a standard form and the typical flow of processing that data. First we have the HTML form itself:

<form action="register.php" method="post" enctype="multipart/form-data" name="register" id="register" >
      <input name="First" type="text" size="10" maxlength="25" autofocus id="First" placeholder="First Name" /><br /><br />
      <input name="Last" type="t…

Flat Design - Passing Fad or New Staple

Image
As you no doubt have heard, many designers have or are turning to flat design. And there appear to be several reasons for this many of which reflect solely on that designer's personal preference, but if you think the reasons stop there, read on.

 Flat design is a style that lacks the “tricks” designers often use in order to create a realistic or three-dimensional effect. The style is characterized by an overall minimalistic look, bright but muted colors, bold - often retro typography and simple user interface elements such as buttons or icons.
Flat design techniques avoid embellishments such as bevels, embossing, drop shadows, gradients or artificial textures. Typically you will see flat designs used in mobile applications or in web sites with only a few pages, and rarely if ever will you find any sort of animation in a flat design.



 So this begs the questions: Why would you use it or when should you use it? Unfortunately there's no short answer to either of those questio…

MySQL Databases & PHP Scripting- Part V

I know it's been a couple of months since the last post, but it's time to round out this 5-part series with information on how to create and check browser-side cookies plus generating HTML encoded e-mails.

 To get us rolling let's do a quick review about the previously discussed method for tracking a user's session. In Part II of this series: http://digitaldreamwebdesigns.blogspot.com/2013/05/mysql-databases-php-scripting_28.html, I outlined how to create a session variable when a user logs in, and then how to check to see if a user is already logged in by checking if our session variable is set (as shown below).

 <?php
   session_start();
   if isset($_SESSION['USER'])
   {
      // User is logged in. Show the rest of the page or information as applicable
    }
    else
    {
        // User is not logged in. Take them back to the homepage.
        header("Location: ../index.php?action=no");
    }
?>

 What we'll focus on today is a slightly different …