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 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

Minding Your <table> Manners

Beginners often mistakenly believe that tables in web pages are evil. But they're not; for tabular data, they are the perfect structure - and those tasked with updating or maintaining legacy sites, knowing how to use tables in Dreamweaver is a vital skill. Here, Molly takes the newcomer to Dreamweaver on a tour around Dreamweaver's table-handling functions, and explains what's good, what's bad - and what's just plain ugly. Read More

PHP: Site Registration and Confirmation Completed

Over the last two tutorials, we have been building up a user registration and validation system using as much of Dreamweaver's built in functionality as possible. We have built our database and created a form with validation for capturing the users' details, and then sent the user a confirmation email and written a script that tests for a human user and validates them against the database. We also wrote a small script that lets us test our system without having to send emails all over the place. This week we'll finish off our system by creating a small addition to our users.php script, add some functionality for the user to reset their password if they have forgotten it and then create a set of login pages that works with the database structure that we created in the first tutorial.

 

All the code for a full PHP log-in and confirmation suite is included with this tutorial!

 

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

JavaScript: Disabling and Enabling Form Fields Dynamically

Sometimes you have a form that has dependencies. By this I mean that one (or more) field's values depend on another field's values. For example, you may not want the user to fill in field B until the user has filled in field A.

One way to solve this is to dynamically hide and show form fields, which we have talked about in the past. Some people don’t like parts of their form disappearing and reappearing on them, however. If that is the case what you can do is disable and enable them instead.

Read More

SQL Server Stored Procedures: the Whys and the Hows

In this tutorial, for intermediate ASP/ SQL developers, Rob looks at Stored Procedures, free utilities for developing them, how they can help prevent SQL Injection attacks by seperating ASP and SQL code and speed up processing by allowing pre-compiled code on the SQL Server. Read More

Creating a site map from styled lists

In this tutorial we will look at how to lay out a site map using nested lists and CSS, discussing why nested lists are the most appropriate way to lay out a site map and how we can use CSS to style the site map to show the different sections within a site in a clear way. This tutorial also demonstrates some key concepts in CSS usage – showing how CSS styles 'cascade' and are inherited by elements within a parent element, a fact that we use to our advantage in this tutorial.

Read More

Working with Images

Images are used on the web as everything from navigation buttons to photo galleries. They can be used as decorative bullets in lists or for animations and advertisements.  Images can be placed in the background of any page element when using CSS, allowing for numerous interesting visual techniques and contemporary design. Images can also have behaviors applied to them, and with the effects available in the graphics applications and in Dreamweaver, images can provide your site visitors with a rich visual and interactive experience.

 

Molly show some of the basics of adding  images to your HTML pages, using Dreamweaver as your development tool.

Read More
Newer articles Older articles