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 #9: Working with Objects

In this tutorial, we look at what classes and objects are, and how they can be used to make your code more organized, with the benefit that they can easily be shared between people and projects. We then see how a class is defined, and how to add properties and methods to the class, as well as how to use a constructor function which is run automatically when a new object is created from the class.

 

Finally, we create an example class that can be used to easily generate HTML tables, so you only have to setup the appearance of the table such as its width, border etc, and the class does the hard work of actually generating the HTML code to create the table.

Read More

MySQL: Exporting Data to Excel

So, your web site is all running nicely, and suddenly your boss wants a report on how many users in the database are aged between 30-35, or live in France, or visited in the last week. Of course, the site spec never had any reporting facility, and you'll be asked to produce custom SQL queries like this every time they have a marketing meeting to discuss leveraging synergies while thinking out of the box.

In this article, Allan shows you how to make the data easily exportable from a MySQL database into Excel, ready for Powerpoint loveliness, and then shows how you can bag up the code as a Dreamweaver Server Behavior for the next time the boss interrupts your game of Quake.

Read More

Using the DMX Layout View

Stepping Stones is a new series building on the recent Cornerstones series. In our first article Molly is looking at the Layout view - a special view that Dreamweaver MX supplies you with as an aid to table design.

Read More

Beginner's SQL: How about a Date?

Today we will uncover the secrets to success using dates in SQL, secrets not at all difficult to understand, once you've seen them. In a way, they're like magic tricks. If you know how the tricks are done, they're not really magic, although they may still be delightful.

This article contains explanations, tips, and examples for several different database systems, but makes no attempt to be exhaustive. There's just not enough space or time. My intent is to give you the confidence to deal with your own date situations, by helping you understand how they all work.

Read More

PHP Basics: Cookies and Sessions

In this tutorial we're going to look at how to use cookies and session variables in PHP, to allow you to save data for the user as they move between pages. This can be used for a number of different uses such as for creating a log-in system to secure your site, or saving data for a user's shopping cart, for example.

Read More

Design: Achieving Unity

Over the past few months we focused on design elements and how to use these elements in our web designs. However, we still need to understand how these elements combine to form design principles. This week, we’ll view several sites to understand these principles, or design rules. By rules, I mean rules that can be broken, but only if we understand how they work in the first place. So, we’ll take these principles step-by-step, because each one is achieved through all the design elements.

Read More

MySQL Data Types

While I've been writing my tutorials for DMXzone, I've often been surprised at how many support queries I get from people who have difficulty because they're choosing the wrong datatype for their database columns. That's one of the negatives about Dreamweaver's power: it can insulate you from the nitty gritty of data too much sometimes. So, following several requests, I've put together a tutorial on the different ways to store data in MySQL. Even if you think you're an intermediate DW/ PHP developer, you might learn something ..  

Read More

PHP Basics 7: Connecting to a MySQL Database

Dreamweaver MX contains a number of server behaviors for connecting to a MySQL database and performing database operations, these can be quite limiting and if you want to build a truly powerful website you really need to be able to hand code the database operations yourself. Once you can do this all limits are removed and you're no longer limited in what you can achieve!

 

 This tutorial covers:

Building a Database 
Creating a table - users 
Adding Data to the Users table 
Working with a MySQL database 
Connecting to the MySQL Server 
Select Database 
Execute MySQL Query 
Close Server Connection 
PHP Commands for Working with the MySQL database 
Connecting to the MySQL Server 
Select Database 
Execute SQL Query 
Close Server Connection
Working Examples 
Reading Records from a Database 
Adding Records to a Database 
Modifying Records in a Database 
Deleting a Record from the Database

Read More

CSS: User-customisable Site #1

This three-part tutorial will take you through the process of building a site that uses CSS to not only allow the user to change the color scheme and font size of the site, but allows them more precise control over the layout and colors used – allowing them to select x color scheme with y layout and z text styling – in any combination that they wish.

In this first part we will plan our layout and create the default stylesheets for the site, splitting the styles into those used for layout, color and font styles. Next time we will create our alternate stylesheets and in the final tutorial will look at ways to allow the user to select which stylesheets they want to use to view the site.

Because we move pretty fast, this tutorial is for those who have a basic understanding of CSS and is therefore not for newbies.

Read More

Cornerstones: Simple Server Side Includes

Most sites have fixed items that appear on every page such as navigation, menus, and footers with copyright notices. Server Side Includes allow you to move these portions into individual files, and give a command in the main HTML or XHTML document that tells the server to include the content of those files where the include statements are, making it much easier to make site-wide updates to those commonly editied portions of your page. This tutorial shows you how to use Server-Side includes with Dreamweaver MX or MX 2004. Read More

SQLite 2: The Killer Features (and the sadly lacking)

As we saw last week, SQLite  is an SQL database engine that will be supported in PHP5 and which can be embedded directly into your applications. 

In this second tutorial, Allan looks at the killer features- temporary "in memory" databases and triggers which can "cascade" one change throughout the database, and looks at ways around the most important feature yet-to-be-implemented feature,  the lack of an ALTER TABLE function.

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.

Read More

Beginner's SQL: Aggregates and Grouping

When you create a database-driven Web site, you will encounter a number of common data retrieval scenarios. Simple lists, header/detail listings, row difference calculations, and reports with subtotals can all be satisfied using fairly basic SELECT queries. But when you move on to functions that aggregate data - to find sums, averages, counts and the like, there's a few gotchas that can baffle the newbie and trip up even the experienced developer.

Wave goodbye to Aggregate and groupings gotcha misery with Rudy's easy-to-follow tutorial on some of SQL's powerful aggregating functions!

Read More
Newer articles Older articles