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

Advanced User-Customised Content

In the last article we took a look at how we could make a very simple system to display content in categories that the user is interested in. By default, the user sees everything, but can amend  their preferences to select categories that (s)he does not wish to see.

The only drawback to this system was that we could only classify an article under a single category or topic, thereby having to create over-generalised topics so that we could accurately classify the articles.  So instead of having topics for Linux, Windows and Macintosh OS X, we had to have a catch-all category of Operating Systems, in case an article covered more than one type of operating system.

In today's article we'll alter the structure of our database and change the admin pages so that we can give an article more than one topic.  We'll then take a look at how this affects the code that we wrote to display the articles on the main page.

Read More

Beginner's SQL: Loop The Output

In this second article in the new Beginner's SQL series, a common performance problem is solved. When a database-driven Web page runs a query to retrieve some data, and then uses a value from each row in the result to run an additional query, this "query in a loop" requires excessive and unnecessary database overhead. More importantly, the total time to complete the database retrievals, and thus the resulting Web page download time, balloons. In this article, four examples are shown which "loop the output" and not the query: simple lists, header/detail listings, row differences, and subtotals. Read More

PHP Back to Basics: Functions

In this tutorial, we're going to look at using functions in PHP. Functions allow you to lay out your code in a more organized way, and allow you to easily re use your code, saving you time, and making your projects easier to read and debug.

 

We’re going to look first at what functions are, and how they can be used. We then look at how to create a function in your code, and how to make the function accept arguments which can then be used in the function code. Next, we see how to return a value from a function to the calling code, so that the result can then be output or sent for further processing.

 

In the second part of this tutorial we look at the scope of variables, and how variables from your main code can be read or changed from within a function. Finally, we look at using the static command which can save the data held in variables between function calls.

Read More
FREE

FREE! Building A File Upload and Rating Application

Following on from his free tutorial on building a Content Management System with Server Behaviours and the Advanced HTML Editor, Matt shows how build a site that allows users to upload their own files, and rate those files. There's also a password-protected moderator's area so that you can be sure that all files can be checked before being made "live".

This free tutorial is suitable for beginners and uses only built-in Dreamweaver server behaviors and the DMXzone Pure ASP/  ASP.NET Upload Extensions! The uploading element is also PHP compatible, but the "rating" system doesn't work with PHP since it has no Command behavior to do the rating with.

Read More

Building content based on user profiles

If you’re building a web site that provides different kinds of dynamic content to the users of your web site, a nice feature is to let your users decide what types of content they want to see. A good example of this is a site like slashdot.org – every day they will post links to articles that cover a wide variety of subjects, and in the preferences you can decide what kinds of articles you want to see.

The way that their system works is an opt-out solution. By default you will get all articles of every topic displayed on the main page. You can then go into a preferences page and there select article topics that you are not interested in.

 

We build up such a system today; it's simple to follow and the code is provided.

Read More

Quick and Dirty Coding with JavaScript Snippets

Dreamweaver includes several dozen code "snippets" and functions to help you quickly add JavaScript to your Web pages. These self-contained JavaScript code fragments and functions are used to perform common tasks including everything from calculating the area of a circle to opening a new pop-up window.

 

In this beginner's article, Jason shows how to use the Snippets panel, and how to store your own favourite pieces of code as snippets for re-use next time.

Read More

PHP Back to Basics 3: Arrays

In this tutorial we will be looking at arrays, which are extremely widely used in PHP. Data is often returned in the form of an array, for example when you read records from a database, or reading the data entered into an HTML form which has been submitted by the user.

We'll start by looking at what exactly an array is, and then look at the methods which can be used to create or add data to an array. We then look at the various ways you can work with data held in the form of an array, working through each element of the array in turn, and merging the data from two arrays into one.

Finally, we look at sorting data held in an array, so that the data is transformed into alphabetical or numerical order.

Read More

CSS/ JS: Show-hide help on forms

Rachel provides all the code and shows you how to provide help within a form which can be toggled on or off via a button on the form, using CSS, XHTML and some JavaScript that degrades properly for users without JavaScript or CSS support. The same technique can be used to show or hide areas of any page - for example, to unhide a news story if the headline is clicked, for example. Read More

Colour Schemes 2

Last week we took a look at monochromatic, analogous and complementary colour schemes, and viewed a few samples of these harmonies from the web. This week, we’ll study triad and tetrad colour schemes, and we’ll also see how colour can be used as a depth clue. We will work with the same colour wheel as we did last week for continuity, and at the end of the article I’ll include links for further research into colour harmonies for the web.

Read More

Intro to Frames in Dreamweaver MX

There's a lot of controversy over the use of frames on the Web. Some sites benefit enormously from a frameset user interface, whereas some designers maintain that frames are always a usability and accessibility nightmare. As usual, the truth is in the middle - and, as usual, Molly cuts through the B.S. to give beginners the low-down on what Frames are good for, what they're bad for, and how to make framed sites in Dreamweaver MX and MX2004. Read More

PHP: Password Encryption and Retrieval

If you're running a system that password-protects sensitive data, you'll also want to encrypt the passwords themselves in case anyone hacks your server and reads the password database. Allan runs through the various options available in both MySQL and PHP, dealing with one-way encryption and methods of decrypting passwords so that password reminders can be sent to the user, for example.

This tutorial stands alone, but can also be optionally used to extend the registration and confirmation suite that we built previously (part 1, part2, part 3).

 

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

Beginner's SQL: Cross Joins

A BAZILLION ROWS OF DATA! Has this ever happened to you? You have a working SQL query to retrieve data from a database table. Now you want to add a second table into the query, for related or more detailed data, and all of a sudden you have a bazillion pages of output. You have discovered the dreaded cross join effect. Despair not.

Whenever there are two tables in an SQL query, they will be joined. This means the rows of one table are combined with the rows of the other table. You must always pay attention to how you want them to be joined. With a bazillion rows, maybe you don't want a cross join. Other times, a cross join is exactly what you want. So let's look at this cross join effect more closely.

 

Read More
Newer articles Older articles