Explore the Premium Content

Working With Strings in .NET

During the course of this tutorial you will learn about the string class and many of the methods that it contains to make working with strings relatively easy, from converting the case of a string to finding out if it begins with, ends with or equals a specified value. Basic string formatting using the Format method and finding and extracting sub strings within a string are also covered. All the tasks typically associated with working with string data is covered such as copying, inserting, removing and replacing text in a string as well as how to clean white space from the ends of user input and working with string arrays.

Read More

PHP Custom Web Statistics – Part 4: graphing the statistics

In the final part of this article on creating custom web statistics using PHP and MySQL, we're going improve on the display of our custom web statistics by adding some graphs, which give an easy to read display showing the best and worst months of the year, or days of the month for example.

 

In this tutorial, we'll first give a brief overview of the GD image library, and how to check whether it’s installed, as well as how to install the library if its not already part of your PHP installation. Then we'll look the PHP image functions that are necessary to perform the various drawing operations used to create the dynamic graphs. Finally, we'll adapt the month.php and year.php pages to display custom graphs of the relevant hit data.

 

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

PHP/ CSS Image Gallery: Thumbnailing a Portion of an Image

In last week's article ("PHP/ CSS Searchable Image Gallery") we looked at how we could build an image gallery using PHP and MySQL and then display it with minimal effort by positioning the images on the page with CSS. Today we build an admin tool that allows you to define thumbnail images which we will link to the main image, but rather than blindly resize the thumbnail to within a set of specific size constraints, we will interactively provide you with a way of selecting a portion of the image to use as the thumbnail.

So, using this code you can interactively choose which area of a photo to use as a thumbnail, looking far more professional than presenting a tiny hard-to-see thumbnail of the whole picture. As an example, here are two seperate areas being selected as thumbnails, using the script provided and explained in this week's 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

ASP: Role-based User Authentication

Today's article is a complete look at  how to configure the database to handle roles for our precious users, and then we'll explore a simple way to authenticate users on a task by task basis. The idea is to map users to the areas of functionality, or modules, they will use.

We make a simple but scalable role based authentication system by storing the data in a normalized way allowing us to easily rebuild the data in the user's session, and  create a quick but logical way to query this data. We implement the ever-important security check, and make sure that the user is forced to log out when his/her permissions change.

Although this tutorial is not beginner-level, all the code is provided if you just want the solution without understanding how we got there!

Read More

PHP/ CSS Searchable Image Gallery

This tutorial teaches you how to build a dynamically generated Photo gallery. The database stores keywords against each photograph, and then user can search on those keywords and the resulting images are dusplayed, using PHP to query the database and CSS to present the page, and so avoiding tables and fixed numbers of columns.A basic admin system is also built up for you to put images into a database on your server.

This tutorial is suitable for intermediate-level Dreamweaver users, although no previous PHP knowledge is necessary.

 

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

Sorting and Paging with a Repeater

This tutorial will explain how to implement sorting and paging within a repeater Server Control. The techniques shown can also be used to implement sorting and paging with other DataBound controls such as a DataList. First we will see how to implement sorting columns in both ascending and descending order, simply by allowing the user to click the column headers in a table. As you probably alread know, the DataGrid Server Control has built-in paging features, which means that to implement paging in a DataGrid control, all you need to do is set a couple of the DataGrids properties. 

However, not so many developers know that the PagedDataSource Class used to provide the DataGrids paging features can be used directly to facilitate paging on any type of DataBound control. This tutorial will demonstrate how this can be done. We will also see how both sorting and paging can be combined to implement a sorted and paged repeater.

Read More

PHP Custom Web Statistics Part 3

In today's tutorial, Gareth provides and walks through the the code  to collect and display of your site's visitor statistics. We examine ways to select data in MySQL and display different types of hits in PHP. You learn how to identify different browsers, opeating systems, and whether the visitor is a "bot" or not ( robot from a search engine or other web crawler) and, if so, how to identify its origin, in order to display statistics to help you understand who visits your site.

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

Using ASP.NET List Controls

This tutorial will explain how to correctly use the ASP.NET List Controls. These comprise of three types of control, DropDownList, ListBox and HTMLSelect. During the course of this tutorial you will learn how to bind dynamic data such as Database contents and how these controls can interact with events and other controls on your page. A common problem associated with using these controls in Dreamweaver where the selected item often ends up being the first item in the list after a postback is solved. How to manually insert, delete and pre-select items in a list controls is also shown. Read More

PHP: External Debugging With Sockets

Usually, when debugging a PHP script, the easiest method is using echo statements to write variables to the screen to trace the progress of the program. But imagine you're trying to debug a PHP script that produces an image, Flash file, PDF or some other multimedia; dumping to the screen will break the content that the script is trying to produce!

This tutorial provides a solution that uses sockets to connect to a port on our  machine or another machine, and write debug information out to that. This way we can have the output of our script displayed correctly or incorrectly as the case may be in our web browser, and the information about the variables in the script sent as output somewhere else.

Code is provided for Windows, Mac OS9, OSX, Linux and the RealBasic source.

Read More

ASP/ CSS: Searchable Image Gallery

This tutorial teaches you how to build a dynamically generated Photo gallery. The database stores keywords against each photograph, and then user can search on those keywords and the resulting images are dusplayed, using ASP to query the database and CSS to present the page, and so avoid tables and fixed numbers of columns.

This tutorial is suitable for intermediate-level Dreamweaver users, although no previous ASP knowledge is necessary. All the code is provided.

Read More

PHP Graphing: 3D-Effect Pie Charts

This is the final article in the series on using PHP libraries to produce graphs on-the-fly from dynamic data. We've generated line graphs, bar graphs, pie charts, then coloured the pie charts and exploded them. This final tutorial shows how to produce 3D-style pie charts that can't enhance your sales figures - but can at least make the presentation of them look nicer!

All the code is supplied for you to download, adapt - or just import straight into your PHP pages so you can up and running straight away!

 

Read More
FREE

ASP.NET Events for Beginners (Free!)

As you are aware in real life an event is when something notable occurs, such an earthquake or somebody walking on the moon, even you getting out of bed this morning could be considered an event! Within an ASP.NET page events are just the same; they mark something notable happening during the page's execution lifecycle and let you know about it when it happens. A prime example of this is Page_Load, this is raised early in the pages lifecycle and you can place your own code into the Page_Load event procedure.

Read More
Newer articles Older articles