Premium Content


Premium Content articles are the very best articles from the world's leading internet technology, subject-matter experts. We have many categories of content below on a wide variety of subjects that have all been commissioned from big name authors.

Explore the Premium Content

PHP Basics - conditions and loops

In this tutorial we look at conditional processing and the different commands available in PHP to perform this. Conditional processing allows you to choose which parts of your code are run depending on certain conditions, such as data entered by a user or results from a database.

 

In the second part of this tutorial, we move on to look at loops in PHP. We first look at the PHP for loop, which enables you to repeat a section of code a certain number of times, to perform calculations or to display rows of dynamic output.  We then look at the other types of loop such as the do loop and do … while loop which come in useful in a range of different situations.

 

Finally, we look at nested loops, which are loops within a loop. These are extremely useful for creating HTML tables, and have a number of different uses such as laying out photos in an online photo gallery.

Read More

JavaScript Basics in Dreamweaver MX

If you want to present anything more than static images and text on your Web page, you will need to script it. Scripting allows you to add code to tell the Web page when to perform an action in reaction to an event. With scripts, you have the power to sense events that happen on the screen, such as the mouse pointer passing over a graphic, and then have the Web page perform a particular action (or reaction really), for example, change the graphic just rolled over.

 

In this tutorial, Jason shows you how to add JavaScript to your page using Dreamweaver MX or MS 2004 using the <script> container; how to ensure that users without JavaScript can see content with the <noscript> container, and also how to link to external .js files using DMX and MX 2004

Read More

PHP: Site registration and confirmation with a Validation code Image

In the second part of this series on building a registration and confirmation suite in PHP, Allan builds a testing script so that you can test the pages without being logged on or using a SMTP server, and builds a Validation Code Image display and checker, similar to the one illustrated, so that you can be sure that it's a real person registering, and not an automated script.

 

Please note that this article forms part of a chapter in the DMXzone e-book PHP Web Applications for Dreamweaver: Juicy Solutions for the Busy Developer.

Read More

Colour Schemes 1

We all know that colour is important, because we respond to colours, including their shades and tints, and colour saturation. Since we use a minimum of two different colours in our sites (one for background, one for text), what colours do we choose? How do we make numerous colours work together? This week, we’ll look at a few colour schemes used by graphic artists, fine artists, and interior designers that will help us decide which colours to use for our specific products and services.

 

The colour schemes that work well together are called "Harmonies", and today's tutorial looks at how you can use three different types, monochromatic, analogous and complementary harmonies, to create a visually pleasing colour scheme for your site.

 

Read More

PHP: Registration and confirmation email system part 1

If you’ve ever tried to register on a web site to use a forum or download the trial version of a product, you may have come across a registration system that emails you a message that you have to respond to before your login or account is activated. Today we’re going to start taking a look at how we can go about creating such a system. We’ll build the interface in Dreamweaver, but by the very nature of what we’ll be doing we will also need to spend some time in the Code View. This article is divided into three parts. The contents of both articles are;

    1. Enter your details in a web form
    2. Submit the form to the web site
    3. Wait for confirmation email
    4. follow instructions in confirmation email, usually a link to click
    5. Log in to site with confirmed login and password

Please note that this article forms part of a chapter in the DMXzone e-book PHP Web Applications for Dreamweaver: Juicy Solutions for the Busy Developer.

    Read More

    ASP.NET: Uploading an Image and creating a thumbnail

    During the course of this tutorial you will learn how to provide users with the facility to upload files to a remote server using an HTML form; specifically this tutorial will focus on uploading image files to an Images directory and saving a proportionally-sized thumbnail of the uploaded images in a Thumbs directory. The code presented here is able to identify if an image is landscape or portrait and adjust the dimensions of the generated thumbnail accordingly. This is a very common scenario on a typical e-commerce site where a product list page would show the thumbnail images and the detailed product info page would show the larger image. This tutorial demonstrates how to code the ASP.NET for uploading gif and jpg files.

    Read More

    CSS Curved boxes layout

    CSS layouts can often seem a bit “boxy” – while divs with CSS borders applied are nice and clean in terms of mark-up they can look a bit boring in comparison to old style table layouts that make use of curved images carefully placed in table cells to give rounded corners on page elements.

     

    In this tutorial we will learn one method of creating curved boxes in CSS layouts and we will also look at how the method can be used within a CSS layout to create a less boxy look and feel for a three column design.

     

     

    Read More

    Playing With the Rainbow: International Colour Implications

    Last week we looked at Real World Music and how they used colour to link their business subsidiaries together throughout their web site. This week we’ll examine colour perception. Perception, in this case, is how we see colour, how we respond to that colour, and why some colours are better for some contexts than others. We learn which feelings are evoked by which colours, how those translate internationally, and by examining the international McDonald's web sites, the Gay Pride Rainbow Flag and Homeland Security Advisory System, we see how different colour schemes work. Read More

    PHP - Back to Basics part 1

    After a number of requests, in this series we’re going to back to basics and will look at PHP from a beginner’s point of view. If you’re looking to expand your knowledge of PHP, and want to move beyond what the default server behaviors etc that Dreamweaver MX offers, to create more advanced sites, then this is the series for you, so that you can get to grips with PHP and really understand what's happening when you begin to handcode and add more powerful features to your web pages.

    First, were going to look at how PHP actually works, and how the PHP code is processed on the web server, and how the web server knows which sections of the page represent PHP code. We then move on to look at the order in which certain PHP operations should be placed on the page, so that they can be processed in a logical order.

    In the second half of this tutorial we look at how to create simple output using PHP, and setup variables which can be used to hold values which change during the course of the script. We then look at a range of different operators which can be used to work with the values in variables, ready for the next part of this tutorial where we will be looking at conditional processing.

    Read More

    PHP/ CSS Advanced Image Gallery part 4

    In last week's article we added some functionality to our admin page and altered the main gallery page so that users of your site could search for images and then click through to view a full-size image.  In this weeks article we will add some cool functionality to our gallery so that when a user clicks on a thumbnail to a full-size image, they can navigate through all the other images without having return to the main thumbnail gallery.

    A few loose ends are tidied up, and the result is a fully-functional image gallery using PHP and CSS - no tables - with all the code attached for download.

     

    Please note that this article forms part of a chapter in the DMXzone e-book PHP Web Applications for Dreamweaver: Juicy Solutions for the Busy Developer.

    Read More

    The JavaScript News Ticker

    When the web was born, web authors inevitably put up some pretty cheesy web sites. When JavaScript was born, cheese rose to heights unimagined! The news ticker is one of those things of which I’m not sure belongs in the cheese category or not. It can be a useful little tool to draw attention to the latest headlines.

    One such ticker can be seen at the BBC News web site, over at http://news.bbc.co.uk/. I think the nice thing about the ticker is that it is done in a tasteful manner. It doesn’t dominate the page. Each news piece is a link to that story, and it doesn’t use any real cheesy effects to draw undue attention to it.

    Each title stays around long enough so it doesn’t get annoying. With these things in mind, it seems like it could be a nice addition to a web site. So let’s tear it apart, build it back up again in our patented simplified manner and make use of it!

    Read More

    Role based user authentication 2

    Welcome to the continuation of the last article I wrote, ASP: Role-based User Authentication. Previously, we looked at a way to provide role based authentication in a generic manner. We linked modules of functionality to users through four roles: Read, Add, Update, and Delete. We also provided ‘blanket’ Full access without explicitly storing a record for each of the roles. As this article follows on from last time, I highly suggest you read that article first – but it's not compulsory, as the code is provided.

    Today, we’re going to create a simple web-based administration tool for managing these permissions. For the sake of brevity, I won’t go through all the pages such a tool would have, I’ll concentrate on the two pages that tie it all together.

     

    All the code is provided, as usual, in the code download link below the PDF buttons.

    Read More
    Newer articles Older articles