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

Graphing: dynamic 3D bar charts

In today's article on dynamic graphing with PHP, we convert the supplied script that plots a a line graph into one that plots a bar chart on the fly from dynamic data:



Then, we discover how to fill the bars with colour:


Finally, we give the bars a 3D perspective effect:


The start-up code is provided, so the tutorial is for Dreamweaver users with any level of PHP experience.

Read More

Using System.Data.DataSet Part 2

This stand-alone article expands upon the previous article by showing you how to populate a DataTable with other types of Data and how to programmatically insert DataTables into a DataSet.  We also cover the DataTable class's Expression property and its Compute method, which make calculating totals from your data much easier. Finally we will see how to save DataSet contents to XML files and then load the XML Data back into a DataSet -  a very handy feature when you need to transfer DataSets to another computer, or the same computer at a later date whilst preserving the Dataset’s structure and data.
 
The following topics are covered in this article:
 
  • Populating a DataTable with other types of Data
  • Programmatically Inserting the DataTable into a DataSet
  • An introduction to the DataColumn class
  • The DataTable Compute method
  • Saving DataSet Data as XML Data
  • Reloading Saved XML Data into a DataSet
Read More

Web Design Mysteries: Elements of Design

Be honest.

Have you ever trolled around the web to find a design that you like?
Have you ever contemplated stealing the mark-up or styles from another site?
Have you ever tried to emulate a site, but just couldn’t pull it off?
Have you ever played with an existing site just for fun, and found that if you change even one color the whole site looks off-kilter?

For many of us, especially those from a coding background, we know good design when we see it, but find it very difficult to replicate it, or even describe why it appeals to us. Trained artist, Linda Goin begins this new series, which is a crash course to help newbies and coders understand why they like a design, how to adapt it without stealing it, and how to come up with sparkling new designs of their own.

In this first tutorial, Linda lays out the terms and vocabulary that you need in order to understand and discuss designs - the ingredients that you need to cook together. Using examples of sites out there on the web, we look at how to recognise, and what we mean by

  • Line
  • Color
  • Volume
  • Movement
  • Space
  • Texture
  • Value
  • Typography
Read More
FREE

Free Web Development Tools: The Accessibility Toolbar

Please note a free article detailing the 1.0 release version of this Toolbar is now available here.

Many people find that learning a new web language like CSS or XHTML is tricky from a book which is heavy on the theory, and find they learn best by looking at other people’s sites and seeing how they work. Of course, you can always “view source” in the browser to see the mark-up and check the location of the CSS file to download it, but, as Dreamweaver users, we tend to like the visual approach. Well, now for those using IE under Windows, there’s a free toolbar that offers many options for visual, one-click investigations of the structure of sites, developed by the Accessible Information Solutions (AIS) team at the National Information and Library Service (NILS), Australia.

Don’t be fooled by the name - even if you’re not designing accessible sites, it’s a great way to develop your CSS and HTML skills as well, of course, check accessibility. It gives you all kinds of information about the structure and styles of the site you’re visiting – invaluable if you’re wondering how they made that stylesheet, or learning modern coding techniques.

Read More

Graphing with PHP: Line Graphs

In our tutorial last week, Graphing with PHP, we started building a class that you could use to draw a graph using the PHP Image functions.

We used a simple data holding object that contained all of the data that we needed to draw our graph, and then passed that to a graph drawing script by storing the data temporarily in a Session variable on the server. This method allowed us to use our PHP image drawing scripts as the SRC of an IMG tag so that the dynamic graphics could be embedded within an HTML page.
 
At the moment, our class just plots asterisks, so the first thing that we will need to do is change our graph from drawing in asterisk characters for the plot points, to using an actual line. It's helpful to have read the last tutorial, but all the code is supplied for download to allow you to product dynamically-generated line graphs on the fly from PHP. Read More

The JavaScript Date Picker

Sooner or later you’re going to have the need for a user to fill in a field with a date. It’s like Murphy’s Law, it’s inevitable. In any event, one nice way of handling the situation is to provide some kind of widget to allow the user to pick the date instead of having them type the date in manually. Typing in dates manually can often be a problem, especially with a global medium like the web; Americans write 3 January 1/3; Europeans write 3/1. Are your dates 03/01/04? 3/1/04? 1/3/04? 1/3/2004? A date picker, when a user clicks on a date from a calendar-like interface can smooth the process.
 
Such a widget provides a couple of nice features. First of all, it helps you make sure the application gets good data. While it’s quite easy for the user to mistype a date, a correctly built script can place a correctly formatted date in your field 100% of the time.

This tutorial builds the Date Picker in JavaScript. You can cut and paste the code into your own appliciations.

This tutorial is for the intermediate developers in JavaScript.

Read More

ASP and Forms: The Request object

We're going to build a form for a website that will automatically email the form's contents to one of a range of email addresses, depending on a radio button selected by the user. I show you how to build this using Dreamweaver MX 2004, and supply the ASP code, and then we examine it to learn how it works. We examine the differences between the GET and POST methods, server-side valiadtion of the form - and when client-side validation with JavaScript is better.



This tutorial uses DMX 2004 for screenshots, but will work unchanged in DMX.

Read More

PHP Custom Web Statistics

Keeping logs of who visits your site is useful as it allows you to see how many people are visiting your site, and which pages are the most popular and most frequently visited. Pages which have low visitor numbers can then be changed to make them more appealing. Alternatively, it may turn out that your navigation system isn't working as well as it could be, and you can then change it to make the pages with low numbers of visitors easier to find.

Creating your own system using PHP and MySQL means that you can still have detailed statistics about who visits your site, even if your web host doesn't allow access to the server log files. It also means that you can create your own custom reports to show the data that is of most interest to you, rather than being locked into the standard reports that many web hosts provide.

  • In this first tutorial of the series, we first look at how to obtain information about visitors to your web site such as the users ip address and information about the users browser and operating system from the special PHP $_SERVER array.
  • We then create an include file containing the MySQL database connection parameters which can be added to any page that requires access to a MySQL database. This gives us the advantage that if the MySQL server is changed in the future, then the new connection parameters only need to be changed once in the include file rather than on every page that uses the MySQL database.
  • Then we create another include file that can be easily added to any web page that you want to log, and writes details about the web page visitor to a MySQL database table ready to be analysedata later date.

 

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

CornerStones of Dreamweaver Design: Text Time!

Everything you know about making text look pretty in Dreamweaver is irrelevant.

The way in which HTML and XHTML are supposed to be used to mark up content uses specific logic, creating a document that is considered well-structured. Unfortunately, this is not necessarily the way you’ve been taught, nor does Macromedia Dreamweaver MX automatically create a well-structured document. You have to understand the purpose and meaning of structure, and then use the tool to create well-structured pages. This article will help. You’ll examine headings, paragraphs, pre-formatted text, and unordered as well as ordered lists. Along the way, you’ll learn why the markup used to format these aspects of text should be structured. You’ll also learn to avoid common hacks, making the text within your documents lean, mean, and ready to be viewed on anyone’s machine. Read More

Graphing with PHP

In this and next weeks’ tutorials we will be building on what we have covered by developing a set of basic objects that you can use for drawing graphs from dynamic data. After all, what use is having these great tools for drawing graphs and charts if you can't draw them dynamically? If that were the case you may as well stick to using Macromedia Fireworks or exporting a graph from Microsoft Excel.
 
We'll build up a PHP script that implements a graph object. We’ll start simple and explain the whys and wherefores as we go along – don’t worry of you missed the previous two articles as we'll do some quick revision as we go along.

Today we:
  1. create  a script that implements a class to store all of our graph data. 
  2. We will instantiate the object in our main script and give it all the information about our graph. 
  3. Once we have all of the data in place we will then write out our image tag. 
  4. As that happens we will save the entire object into a session variable and pass an identifier to that session variable to the graph drawing script.
  5. The graph drawing script will then access the graph data object through the session variable and draw the graph accordingly.

This tutorial contains some maths, but the code is provided and is suitable for intermediate PHP developers using either Dreamweaver MX or MX 2004.

Read More

Using System.Data.DataSet Part 1

This article which is the first in a two article series will serve as an introduction to the System.Data.DataSet class and how it can be used to work with database data. It is important for Dreamweaver users to realize that this class is not the same as the DreamweaverCtrls.DataSet used by Dreamweaver but is in fact a built-in feature of the .NET Framework. The System.Data.DataSet and is far more flexible and feature rich than the DreamweaverCtrls DataSet.
 
The following topics will be covered during the course of this article:

  • An Introduction to System.Data.DataSet
  • The Difference between System.Data.DataSet and DreamweaverCtrls.DataSet
  • Populating a DataSet with Database data
  • An introduction to the DataTable class
  • Using Multiple Tables with Relations
Read More

Dynamic Menus with ASP and CSS

Many database-driven web sites are run from some form of content management system, and so navigation menus need to be dynamically created – with the links being pulled from the database. Working in this way means that you may not know how many links will appear in a navigation menu when you design the site, as the number will depend on how many are stored in the database at any one time.

This tutorial explains how to create a menu from a list of links stored in an Access database, using the ASP Server Model and the Dreamweaver Server Behaviors, covering creating the database table, connecting to the database, creating a Recordset and using a Repeat Region to display the data. Once we have created the menu using ASP, we will then
use CSS to style it in an attractive and code efficient manner that will work well no matter how many links are displayed.

This tutorial is suitable for complete beginners in CSS and ASP, and is compatible with MX and MX2004 and above.

Read More
Newer articles Older articles