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: email contact forms

Have you ever wanted a contact form on your website that will automatically email you, instead of leaving a mailto: address? Or maybe a form that the user controls via radio buttons that is directed to the correct person by the logic?

It's easy in PHP, and Gareth shows you how in this article, going through every step - setting up the mail headers, the forms and the PHP code.

Read More

Cornerstones: DMX Forms

Forms are one of the most important aspects of web interactivity. Without forms, we wouldn’t be able to use the web to shop, make hotel and airline reservations, and contact companies and individuals via their sites. Dreamweaver MX makes it especially easy to implement forms.

Of course, forms can get very complex, depending upon how detailed your needs are. What’s more, processing forms can be handled in numerous ways—often relying on server-side scripts to process. In this article, I’ll focus on how to create a form using the most common techniques and leave advanced and server-side information to future or related articles. The point here is to get you familiar with Dreamweaver’s form options and commonly used form components.

Read More

SQLite: new PHP-bundled database

SQLite  is an SQL database engine that will be supported in PHP5 and which can be embedded directly into your applications. Because the engine works with a single data file, this means that you can use full SQL functionality without having to install an SQL server. If you've ever despaired at not being able to include database functionality in your PHP pages because the machine you're using as a web server doesn't have MySQL installed, or if you ever need the features of the SQL language without having to connect to database servers, then this article is for you.

Since most PHP people are familiar with MySQL, we'll show you how it differs from that database. We'll then take a look at how to enable SQLite in the new PHP 5, and with a little bit more effort, PHP 4.3.x. With that out of the way we'll get down to the important stuff of using SQLite.

Read More

PHP Basics: Forms, GET and POST

In this beginner's tutorial, Gareth shows the options available in HTML forms via Dreamweaver and how to retrieve data passed via a form through the GET and POST methods, and discusses the difference between these different ways of passing user data. Read More

Next Step CSS: Image Replacement Techniques

There are times when your design calls for images as headings rather than just text - maybe you want a font more interesting than the verdana/ TNR web-safe clones, maybe you want imagery and texture. For a while now, the leading "image replacement technique" has been FIR - Fahrner Image Replacement but this has been deprecated by the CSS police due to accessibility concerns. In this tutorial, Rachel details other emerging image replacement techniques, looks at the pros and cons of each and shows how you apply them to your own pages.

This is the first tutorial in a new series called "Next Step CSS" which goes further into the intricacies of CSS than is can be accurately rendered by Dreamweaver's Design View. For this reason there is some hand-coding required and so we emphasise that this is NOT FOR NEWBIES who don't like to handcode.

Read More

Textural Troubles and Triumphs

So many sites either have no texture, or are else over-textured through (ahem) enthusiastic use of Photoshop or other image editors. In this tutorial, Linda discusses decorative texture as an integral part of web design when done properly.

The tutorial concludes with a check-list of design elements and principles to be taken account when designing texture for your web site.

Read More

How to Debug JavaScript

In the last of his real-world JavaScript tutorials, Tom Dell'Aringa recognises that just once in a blue moon (ahem), you might write a script that doesn't work. There's loads of articles on DMXzone on how to write JavaScripts, but how to debug your programs has been a neglected area. Until now ... Read More

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

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
Newer articles Older articles