Posts Tagged ‘tutorial’

How to Create a Random Password for Users

Friday, February 1st, 2008

If you’re working on a user-management system, you may find it useful to be able to create a random password for users.

Some systems generate these initially and have the user log in to set a permanent password. You might also have a “Reset” button, where the script generates a random password and e-mails it to the user.

This quick tutorial will show you how to create an 8 character random password containing a mix of letters and numbers. Or, if you’re impatient, jump straight to the function’s source code
(more…)

Use Attribute Selectors to Fine Tune Your CSS

Thursday, January 31st, 2008

Here’s a quick tip for fine tuning your CSS declarations.

You can use attribute selectors to style an html element that contains an attribute with the value that you declare. This allows you to do a bunch of cool stuff – like style different “input” types differently, style anchor tags with titles differently, and etc.
(more…)

How to Use PHP To Dynamically Resize an Image

Wednesday, January 30th, 2008

Screenshot of a Dzone PageOne of the most annoying things about working with images is getting them into the right size. Screenshots start out huge – and you need to resize them to an appropriate size for your website.

Some blogs automatically resize the pictures for you into a thumbnail – like the image to the right. What if you want the image a different size, though? You could allow the browser to resize it for you, or – better yet – write your own php script to resize the image dynamically.
(more…)

How to Create a 3D Button Using CSS and a Gradient Image

Monday, January 28th, 2008

While I was browsing through dzone today, I stumbled on this 3d button css tutorial by Dave Woods.

Using some simple css and a little color know-how, he shows you how to turn a square button into a pseudo 3-dimensional button. I’ll take it a step further and add a gradient background image to enhance the lighting effect. Like this…
(more…)

How to Pass All Elements of a Form to the End in a Multi-Page Form

Sunday, January 27th, 2008

Sometimes forms get long, unsightly, and intimidating. It’d be great if you could cut them up into three or four parts – with a few fields on each page.

In order to do that, you need to figure out some way of storing or passing along the information from the first pages. I’ve heard a bunch of crazy ideas – from storing the information in session variables to writing each part to the database.

The easiest thing to do is attach a very brief php function to the bottom of each page. It’ll do all the work for you and continue to post every item the user has entered. (more…)

How to Create a Gradient Background Image in GIMP

Thursday, January 24th, 2008

Sample Gradient BackgroundThe other day I wrote about how to add a gradient background to a css tooltip. So I thought it might be a good idea to walk through how to create the actual gradient image.

Since I recently switched to Ubuntu Linux, I don’t use Photoshop anymore. GIMP all the way. So this tutorial will show you briefly how to create a gradient image in GIMP and then use it as the background of an html element.
(more…)

How to Use the Crypt() Function to Encrypt and Check Passwords

Tuesday, January 22nd, 2008

Every php-script that involves some kind of user login and database interaction has one very important feature – password checking and encryption.

There are a bunch of ways you could create and check passwords – from an insecure string in a database to an encrypted “hash” that you check against user input. This tutorial will show you how to use the crypt() function to store and check passwords in a php script.
(more…)

How to Create Tooltips You Can Style with CSS

Saturday, January 19th, 2008

Hover your mouse over this link to Web Cash. Notice the tooltip?

You can achieve a tooltip like that on any anchor text by defining a “title” attribute. However, it will also be bland, yellow, and un-styled. You can’t control the size of the box, style of the font, or the general appearance of the tooltip at all.

But there’s a better way. This tutorial will show you how to create custom tooltips using simple, valid HTML and CSS. Once you’ve created the basic tooltip, you can style it to your heart’s content.

(more…)

Good-Tutorials.com: Niche Article Sites to Help Increase Traffic

Friday, January 18th, 2008

This site is fairly new. Ok, it’s really new. So, naturally, I’ve been looking for ways to increase backlinks, search engine visibility, and traffic.

I’ve tried out a few methods, with varying success. What has worked really well, so far, is submitting an article to a niche site: Good Tutorials.
(more…)

Created a New Tool to Encode Sample HTML for Display

Sunday, January 13th, 2008

I added a new script to the “Tools” section yesterday, which should be of interest to anyone that authors a website about HTML.

I’m sure we’ve all faced this problem at one point or another – how do we get sample HTML to display properly, without being rendered, so that users can view it? Moreover, what’s the best method of doing this?
(more…)