Archive for September, 2005

Mysql Database Handling In Php   By John L

Friday, September 30th, 2005

Most interactive websites nowadays require data to be presented dynamically and interactively based on input from the user. For example, a customer may need to log into a retail website to check his purchasing history. In this instance, the website would have stored two types of data in order for the customer to perform the check – the customer’s personal login details; and the customer’s purchased items. This data can be stored in two types of storage – flat files or databases.

Flat files are only feasible in very low to low volume websites as flat files have 3 inherent weaknesses:
1.The inability to index the data. This makes it necessary to potentially read ALL the data sequentially. This is a major problem if there are a lot of records in the flat file because the time required to read the flat file is proportionate to the number of records in the flat file.
2.The inability to efficiently control access by users to the data
3.The inefficient storage of the data. In most cases, the data would not be encrypted or compressed as this would exacerbate the problem no. 1 above

The alternative which is, in my opinion, the only feasible method, is to store the data in a database. One of the most prevalent databases in use is MySQL. Data that is stored in a database can easily be indexed, managed and stored efficiently. Besides that, most databases also provide a suite of accompanying utilities that allow the database administrator to maintain the database – for example, backup and restore, etc.

Websites scripted using PHP are very well suited for the MySQL database as PHP has a custom and integrated MySQL module that communicates very efficiently with MySQL. PHP can also communicate with MySQL through the standard ODBC as MySQL is ODBC-compliant, However, this will not be as efficient as using the custom MySQL module for PHP.

The rest of this article is a tutorial on how to use PHP to:
1.Connect to a MySQL database
2.Execute standard SQL statements against the MySQL database

Starting a Session with MySQL

Before the PHP script can communicate with the database to query, insert or update the database, the PHP script will first need to connect to the MySQL server and specify which database in the MySQL server to operate on.

The mysql_connect() and mysql_select_db() functions are provided for this purpose. In order to connect to the MySQL server, the server name/address; a username; and a valid password is required. Once a connection is successful, the database needs to be specified.

The following 2 code excerpts illustrate how to perform the server connection and database selection:
@mysql_connect(`[servername]`, `[username]`, `[password]`) or die(`Cannot connect to DB!`);
@mysql_select_db(`[databasename]`) or die(`Cannot select DB!`);

The @ operator is used to suppress any error messages that mysql_connect() and mysql_select_db() functions may produce if an error occurred. The die() function is used to end the script execution and display a custom error message.

Executing SQL Statements against a MySQL database

Once the connection and database selection is successfully performed, the PHP script can now proceed to operate on the database using standard SQL statements. The mysql_query() function is used for executing standard SQL statements against the database. In the following example, the PHP script queries a table called tbl_login in the previously selected database to determine if a username/password pair provided by the user is valid.

Assumption:
The tbl_login table has 3 columns named login, password, last_logged_in. The last_logged_in column stores the time that the user last logged into the system.

// The $username and $passwd variable should rightly be set by the login form
// through the POST method. For the purpose of this example, we’re manually coding it.
$username = “john”;
$passwd = “mypassword”;

// We generate a SELECT SQL statement for execution.
$sql=`SELECT * FROM tbl_login WHERE login = “.$username.“ AND password = “.$passwd.“`;

// Execute the SQL statement against the currently selected database.
// The results will be stored in the $r variable.
$r = mysql_query($sql);

// After the mysql_query() command executes, the $r variable is examined to
// determine of the mysql_query() was successfully executed.
if(!$r) {
$err=mysql_error();
print $err;
exit();
}

// If everything went well, check if the query returned a result – i.e. if the username/password
// pair was found in the database. The mysql_affected_rows() function is used for this purpose.
// mysql_affected_rows() will return the number of rows in the database table that was affected
// by the last query
if(mysql_affected_rows()==0){
print `Username/password pair is invalid. Please try again.`;
}
else {

// If successful, read out the last logged in time into a $last variable for display to the user
$row=mysql_fetch_array($r);
$last=$row[`last_logged_in`];
print “Login successful. You last logged in at ”.$last.”.”;

}

The above example demonstrated how a SELECT SQL statement is executed against the selected database. The same method is used to execute other SQL statements (e.g. UPDATE, INSERT, DELETE, etc.) against the database using the mysql_query() and mysql_affected_rows() functions.

This PHP scripting article is written by John L. John L is the Webmaster of The Ultimate BMW Blog! (http://www.bimmercenter.com).

The Ultimate BMW Blog!

Developing A Login System With Php And Mysql   By John L

Friday, September 30th, 2005

Used with the author`s permission.
This article is written by daBoss. daBoss is the Webmaster of Designer Banners. daBoss can be contacted at sales (at) designerbanners (dot) com.

Developing a Login System with PHP and MySQL

Most interactive websites nowadays would require a user to log in into the website’s system in order to provide a customized experience for the user. Once the user has logged in, the website will be able to provide a presentation that is tailored to the user’s preferences.

A basic login system typically contains 3 components:
1. The component that allows a user to register his preferred login id and password
2. The component that allows the system to verify and authenticate the user when he subsequently logs in
3. The component that sends the user’s password to his registered email address if the user forgets his password

Such a system can be easily created using PHP and MySQL.

================================================================

Component 1 – Registration

Component 1 is typically implemented using a simple HTML form that contains 3 fields and 2 buttons:
1. A preferred login id field
2. A preferred password field
3. A valid email address field
4. A Submit button
5. A Reset button

Assume that such a form is coded into a file named register.html. The following HTML code excerpt is a typical example. When the user has filled in all the fields, the register.php page is called when the user clicks on the Submit button.

[form name=`register` method=`post` action=`register.php`]
[input name=`login id` type=`text` value=`loginid` size=`20`/][br]
[input name=`password` type=`text` value=`password` size=`20`/][br]
[input name=`email` type=`text` value=`email` size=`50`/][br]
[input type=`submit` name=`submit` value=`submit`/]
[input type=`reset` name=`reset` value=`reset`/]
[/form]

The following code excerpt can be used as part of register.php to process the registration. It connects to the MySQL database and inserts a line of data into the table used to store the registration information.

@mysql_connect(`localhost`, `mysql_login`, `mysql_pwd`) or die(`Cannot connect to DB!`);
@mysql_select_db(`tbl_login`) or die(`Cannot select DB!`);
$sql=`INSERT INTO login_tbl (loginid, password and email) VALUES (`.$loginid.”,”.$password.”,”.$email.”)”;
$r = mysql_query($sql);
if(!$r) {
$err=mysql_error();
print $err;
exit();
}

The code excerpt assumes that the MySQL table that is used to store the registration data is named tbl_login and contains 3 fields – the loginid, password and email fields. The values of the $loginid, $password and $email variables are passed in from the form in register.html using the post method.

================================================================

Component 2 – Verification and Authentication

A registered user will want to log into the system to access the functionality provided by the website. The user will have to provide his login id and password for the system to verify and authenticate.

This is typically done through a simple HTML form. This HTML form typically contains 2 fields and 2 buttons:
1. A login id field
2. A password field
3. A Submit button
4. A Reset button

Assume that such a form is coded into a file named authenticate.html. The following HTML code excerpt is a typical example. When the user has filled in all the fields, the authenticate.php page is called when the user clicks on the Submit button.

[form name=`authenticate` method=`post` action=`authenticate.php`]
[input name=`login id` type=`text` value=`loginid` size=`20`/][br]
[input name=`password` type=`text` value=`password` size=`20`/][br]
[input type=`submit` name=`submit` value=`submit`/]
[input type=`reset` name=`reset` value=`reset`/]
[/form]

The following code excerpt can be used as part of authenticate.php to process the login request. It connects to the MySQL database and queries the table used to store the registration information.

@mysql_connect(`localhost`, `mysql_login`, `mysql_pwd`) or die(`Cannot connect to DB!`);
@mysql_select_db(`tbl_login`) or die(`Cannot select DB!`);
$sql=`SELECT loginid FROM login_tbl WHERE loginid=’`.$loginid.”’ and password=’”.$password.”’”;
$r = mysql_query($sql);
if(!$r) {
$err=mysql_error();
print $err;
exit();
}
if(mysql_affected_rows()==0){
print `no such login in the system. please try again.`;
exit();
}
else{
print `successfully logged into system.`;
//proceed to perform website’s functionality – e.g. present information to the user
}

As in component 1, the code excerpt assumes that the MySQL table that is used to store the registration data is named tbl_login and contains 3 fields – the loginid, password and email fields. The values of the $loginid and $password variables are passed in from the form in authenticate.html using the post method.

================================================================

Component 3 – Forgot Password

A registered user may forget his password to log into the website’s system. In this case, the user will need to supply his loginid for the system to retrieve his password and send the password to the user’s registered email address.

This is typically done through a simple HTML form. This HTML form typically contains 1 field and 2 buttons:
1. A login id field
2. A Submit button
3. A Reset button

Assume that such a form is coded into a file named forgot.html. The following HTML code excerpt is a typical example. When the user has filled in all the fields, the forgot.php page is called when the user clicks on the Submit button.

[form name=`forgot` method=`post` action=`forgot.php`]
[input name=`login id` type=`text` value=`loginid` size=`20`/][br]
[input type=`submit` name=`submit` value=`submit`/]
[input type=`reset` name=`reset` value=`reset`/]
[/form]

The following code excerpt can be used as part of forgot.php to process the login request. It connects to the MySQL database and queries the table used to store the registration information.

@mysql_connect(`localhost`, `mysql_login`, `mysql_pwd`) or die(`Cannot connect to DB!`);
@mysql_select_db(`tbl_login`) or die(`Cannot select DB!`);
$sql=`SELECT password, email FROM login_tbl WHERE loginid=’`.$loginid.”’”;
$r = mysql_query($sql);
if(!$r) {
$err=mysql_error();
print $err;
exit();
}
if(mysql_affected_rows()==0){
print `no such login in the system. please try again.`;
exit();
}
else {
$row=mysql_fetch_array($r);
$password=$row[`password`];
$email=$row[`email`];

$subject=`your password`;
$header=`from:you@yourdomain.com`;
$content=`your password is `.$password;
mail($email, $subject, $row, $header);

print `An email containing the password has been sent to you`;
}

As in component 1, the code excerpt assumes that the MySQL table that is used to store the registration data is named tbl_login and contains 3 fields – the loginid, password and email fields. The value of the $loginid variable is passed from the form in forgot.html using the post method.

================================================================

Conclusion

The above example is to illustrate how a very basic login system can be implemented. The example can be enhanced to include password encryption and additional functionality – e.g. to allow users to edit their login information.

Used with the authors permission.
This article is written by daBoss. daBoss is the Webmaster of Designer Banners (http://www.designerbanners.com). daBoss can be contacted at sales (at) designerbanners (dot) com.

Using Free Web Page Templates   By Stephen Cope

Friday, September 30th, 2005


Using free Web Page Templates


Templates are used to make the website look and feel consistent.
All websites are built using templates and many website authoring tools and
packages include templates. Here we will look at the templates that are
available and go on to make web pages using these templates.


 Template Types


Templates are created by designers using various tools, and some
i.e. FrontPage templates may require the hosting server to support FrontPage
Extensions. Therefore my advice for beginners is to avoid templates of this type
and use only plain HTML templates. Some of the types you will see
are:



  • HTML———–Use this one if you are a beginner
  • Flash
  • Dreamweaver
  • Frontpage
  • Frames
  • No Frames——This may may not be plain HTML

Most Websites  offer themed templates like:



  • kids
  • business
  • computers
  • music
  • Internet

There is nothing to be wary of here just choose the appropriate
theme for your Website.


Because this article contains graphics is it continued on my
website www.build-your-website.co.uk/making-website-Using-templates.htm

Stephen Cope is a freelance trainer and the Webmaster at -
making a website and IncrediMail and Outlook Express Updates.

Learn Html Tables No Effort Required!   By David A. Saharkhiz

Friday, September 30th, 2005

HTML sounds daunting to the novice webmaster, who often assumes that the HyperText Markup Language, with all its confusing tags and elements, is going to be difficult to understand.

But after a few good website tutorials, the novice learns that learning HTML can be easy and fun; the language is not far removed from archaic typesetting syntax, and once you learn the basics, it`s smooth sailing from then on.

…or is it?

Tables are a big stumbling block for some, and as simple as they are, some novices just don`t seem to get them right away. If you can`t seem to make sense of tables, today`s the day that you finally conquer them! Tables will open a new world of formatting possibilities and allow you to position your content in amazing ways! Start learning by checking out this free HTML table generator and this tutorial on HTML tables. Use the generator to test your knowledge of tables, and use the guide to learn more advanced techniques.

People have been doing amazing things with tables since 1995. Join the party – it`s not too late!

Originally posted by David Saharkhiz at GoArticles.

If you would like more information, check the link below for more information:

HTML Basics

David Saharkhiz is a computer science major and National Merit Semifinalist at Americas Clemson University. He provides comprehensive web-help and HTML help, codes free HTML scripts, and works to help novice webmasters set up new websites.

What Is Sql?   By John L

Friday, September 30th, 2005

What is SQL? SQL stands for Structured Query Language and is the lingua franca in the database world. SQL is a standard that

is used by all database vendors and programmers to define, extract and access the information that is stored in databases.

SQL began life as an IBM creation but was standardized by the American National Standards Institute (ANSI) and the

International Organization for Standardization (ISO) as ANSI/ISO SQL in 1988. Since then ANSI/ISO SQL standard continued to

evolve. The ANSI-SQL group has since published three standards over the years:
1. SQL89 (SQL1)
2. SQL92 (SQL2)
3. SQL99 (SQL3)

SQL is a query language. It is English-like and easy to use. However, although there are more than 90 SQL reserved words,

most programmers seldom use more than the following handful of commands – SELECT, INSERT, UPDATE, DELETE, FROM, WHERE,

HAVING, BETWEEN, LIKE, OR, AND, NOT, IN, ORDER, GROUP and BY.

For example, if you had a database table named `employees` and you wanted to retrieve all records where the employee has the

last name `goodman`, you would use the following SQL statement:
SELECT * FROM employees WHERE lastname = `goodman`;

There are many different categories of SQL statements but the basic ones which all programmers should be familiar with are

the SQL statements that:
1. Create tables and manipulate their definitions
2. Query the table data
3. Manipulate the table data

SQL is predominantly used by 2 types of users – programs and humans (keying in the commands through a database client) – to

pass instructions to databases. SQL commands can be keyed into a database client like the MySQL Query Browser or the SQL

Server Enterprise Manager and executed to either return a result or modify records in the database. SQL can also be used in

conjunction with programming language or scripting language like Microsoft Visual Basic or PHP to communicate with the

database.

Although SQL is a world standard, it is unfortunate that most database vendors have come up with different dialects and

variations. This is because every database vendor wants to differentiate their database products from the crowd. One good

example is Microsoft SQL Server`s TRANSACT-SQL. TRANSACT-SQL is a superset of SQL and is designed for use only with Microsoft

SQL Server. Although it does make programming much easier for software developers, it is not compliant with other databases

like Oracle or MySQL – making TRANSACT-SQL programs non database-portable. As such, although many of these features are

powerful and robust, it is good practice to exercise caution and limit your SQL use to be compliant with the ANSI/ISO SQL

standards and ODBC-Compliant.

Courtesty of SQLPrimer.com. For more information, please contact the Webmaster of

SQLPrimer.com – http://www.sqlprimer.com.

John L is the Webmaster of SQLPrimer.com – http://www.sqlprimer.com.

Starting Cascading Style Sheets   By Stephen Cope

Friday, September 30th, 2005

Cascading Style Sheets (CSS) are being used more and more by web designers to
layout and format web pages. Although they have been around for several years
now many designers have avoided them due to browser incompatibility.

Although compatibility problems still exist they are no longer an issue for
most applications. Here I will concentrate here on the main features and how
they work and why they are used.
You may find yourself using CSS anyway
without you knowing as programs like FrontPage use CSS (depends on page setup
options) for some of their functionality.

Styles Solve a Common Problem


HTML was originally designed to define the content of a document but not the
document presentation/layout. The layout of the document was supposed to be
taken care of by the browser, without using any formatting tags. The content is
defined by using tags like h1,

, table, which basically
say `This is a header`, `This is a paragraph`, `This is a table`, by using tags
like and so on.

The principal browser vendors, Netscape and Microsoft, competed by adding
support for new, proprietary tags (like the tag and the colour
attribute) and technologies that permitted increasingly high-impact Web pages.

These innovations were good for spurring the development of Web technology,
but they created problems as well.

Consequently it became more and more difficult to create Web sites where the
content of HTML documents was clearly separated from the document`s presentation
and that would be displayed correctly on any browser.

The World Wide Web Consortium (W3C) – the consortium responsible for
standardizing HTML – created a language called Cascading Style Sheets, or
CSS.CSS, unlike HTML, is designed solely to define appearance as efficiently as
possible.

It can exist either within HTML or as a linked document, letting developers
separate a Web page`s content (marked up in HTML) from its presentation (defined
by CSS). Both Netscape 4.0 and Internet Explorer 4.0 and later support Cascading
Style Sheets.

Style sheets work like templates: you define the style for a particular HTML
element once (e.g. header tag h1), and then use it over and over on any
number of Web pages.

If you want to change how an element looks, you just change the style;
the element automatically changes wherever it appears. (Before CSS, you had to
change the element individually, each time it appeared) .Style sheets let Web
designers quickly create more consistent pages–and more consistent sites.

How Style sheets are Implemented


There are 3 basic ways to add the functionality of Style Sheets:

1. Inline – Creating the elements for each HTML Tag. This will allow
the same HTML Tag to have different styles on the same page.
2.
Embedding – Creating the elements on the page itself that will affect
every occurrence of an HTML Tag.
3. Linking – Creating one page that
defines the elements and include in the pages that you want to affect.

For beginners using Embedding or Linking is recommended.. The Linking Style
is used when you want to use the same style on multiple pages, you can then use
Embedding and/or Inline on specific pages that don`t fit the design style of the
Linking Sheet.

Precedence and inheritance


As the term Cascading Style Sheets implies, more than one style sheet can be
used on the same document, with different levels of importance. Generally styles
from different style sheets merge together (cascade) into a virtual style.

However, If you define conflicting styles for the same HTML element, the
innermost definition–the one closest to the individual tag-wins
The
precedence Style Sheets follow is Inline, Embedding, then Linking. Inline Style
takes precedence over Embedding Style, which takes precedence over Linking
Style.

There is a fourth style sheet which is set not by the document author but by
the reader and that is the browser default. Taking this style sheet into
consideration the order of precedence is:

1. Inline Style (inside HTML
element) .
2. Embedding Style Sheet (inside the tag).
3.
External Style Sheet.
4. Browser default.

So, an inline style (inside
an HTML element) has the highest priority, which means that it will override
every style declared inside the tag, in an external style sheet,
and in a browser (a default value).

Stephen Cope is a freelance trainer and the Webmaster at -
making a website and Niche Website Guide.

Maguma Will Be Releasing Version 2.5.0 Of Workbench On The First Of June   By Maguma

Friday, September 30th, 2005

Maguma will be releasing version 2.5.0 of Workbench on the first of June

and with it will come many expanded abilities to produce scripts, not only enhanced features targeting PHP developers but this time Python developers will find things to be happy about. The new version will include the ability to execute and preview Python scripts, automatically detecting the script type based on file extension settings. Also new to this version will be the profiling support for PHP scripts, giving the developer an overview of the script timings broken down by file, function and line. The Function List module has been enhanced to provide better support for future Resource Kits that give the user the ability to preparse scripts and display custom library functions and objects. File based template support has been added to Workbench, customizable so that you can use a local repository for personal use or define a network resource to share the templates among a working group.

The full Changelog will be posted on the site with this release that will detail all of the many changes to Maguma Workbench.
Have fun programming
Your Maguma team
www.maguma.com

None

Trilhando Outros Mundos… Eita Sofrimento Bão   By Ruben Zevallos Jr.

Friday, September 30th, 2005

Uma vez um amigo no estado de desespero, disse que iria abrir uma quitanda, para largar mão das coisas que parecem insolúveis da informática. São pequenos detalhes, que nada mais nada menos, são solúveis com a mudança do paradigma, mas quem quer mudar? Ninguém… Na época, disse para ele largar mão. Logo ele estaria colocando um computador para controlar o estoque, mas seria uma coisa simples, que logo cresceria até ter um verdadeiro CPD e a quitanda? Sei lá… mas o negócio seria logo de informática.

O antigo CSS (agora CSS1)
Eu sempre gostei muito do CSS, na realidade foi amor a primeira vista, apesar de todos dizerem que a MS – Microsoft não é aderente a padrões, o IE 3.0 – Internet Explorer 3.0 foi o primeiro a suportar o CSS e somente no NS 4 que o CSS foi implementado, ou seja, vieram outras pequenas versões, mas nada do CSS.

Gostei tanto do CSS, que fiz o meu site todo com ele, e algumas coisas, chegaram a ser referência tanto a respeito do ASP, como do CSS que eu usava em várias partes do site, que não era muito bonito, mas mostrava algumas potencialidades da tecnologia.

A MS, no meu ver, sempre procurou ser a favor dos desenvolvedores, não sei se isso é bom ou ruim, mas ela procura aceitar pequenas falhas do programador, bem como do desenhista de página… fazendo com o que o padrão, seja mais facilmente aceito e até implementado.

Me lembro dos tempos do Mosaic, que se alguma TAG HTML estivesse errada, a página não aparecia, mas logo com a entrada no NS – Netscape, essa facilidade foi resolvida, ou seja, apresentava com erro, mas apresentava.

Muitas pessoas, vêem a MS como vilã dos padrões, que dizem que ela não segue, mas a NS, foi sempre a mais radical de todas e sempre vangloriada neste aspecto, enquanto a MS propunha também novidades, mas uma legião de desenvovedores seguiam.

A conquista do mundo pelo IE
A MS em 1994, anunciou em um documento, informando seus planos para o futuro do sistema operacional, onde ela dizia que o usuário navegaria no servidor de rede ou em algum site na Internet, praticamente sem perceber. Foi uma visão muito avançada e muito antes do mercado dizer que a MS tinha perdido o mercado da Internet.

O lançamento do IE 1.0, foi o maior fiasco, ele foi baseado em um Browser comprado ou somente licenciado, mas foi ruim… o bom mesmo, foi com o IE 3, que realmente veio com diversas vantagens, quais foram o CSS e o ActiveX.

A Inclusão do IE no Windows 98, foi o que fez que hoje ele seja o mais usado atualmente… mas isso não quer dizer que é o melhor, apesar que o IE 6, teve muitas melhorias, mas a MS parou por ai e ainda anunciou que pararia de fazer melhorias.

Um novo erro de visão
A MS tem errado feio, na sua política de querer empurrar servidores… O Windows 2003 Web Edition, não instala o SQL Server 2000… só porque a MS assim determinou. O AD, precisa e é recomendado o uso de 1 servidor para o primário e outro para um backup. Fora os servidores para cada um dos serviços e você? Toma de pagar licenças de servidores… e como são caros…

Não sei se o problema também está no governo Americano, que proíbe a MS de vender mais barato e/ou abaixo de algum valor. De qualquer forma, governo ou a própria empresa, os usuários estão cada vez mais desejando e alguns até mudando definitivamente para ambientes livres.

Trilhando o mundo do CSS 2
O CSS 2, quando foi lançado, veio com muitas coisas legais, como o posicionamento absoluto, onde você poderia colocar qualquer objeto posicionado com base em algum referência, como das marges da janela do Browser… isso abriu um mundo de possibilidades para o design, que não mais precisaria ficar preso ao padrão de esquerda para direita, de cima para baixo, que é o definido pelo HTML e também pelas tabelas.

Tabelas… essas foram a tábua da salvação, para quem está usando o HTML desde a versão 1.0. Como eu sonhava em ter uma tabelinha ou outro meio, que não fosse o

 para colocar alguma coisa fora do padrão do fluxo, mas as tabelas também geraram problemas... Porque para renderizar as tabelas, o browser cria um mapa virtual e vai tomando a memória de uma forma louca... dependendo da página, você pode ter o seu browser com mais de 20 MB de memória em uso, fora as imagens e outros objetos. 

TableLess é a solução, mas ficar usando posicionamento absoluto é um grande problema, porque cada browser, e entenda, que estou dizendo TODOS, sem exceção, não tinham/seguiam um padrão de posicionamento... um pixel para o IE era diferente do Opera ou Netscape... com isso, o seu layout ficava horrível e/ou precisava ter uma versão para cada Browser, já as tabelas... elas eram mais fáceis de ajustar.

Hoje, todos os Browsers estão mais maduros, todos viram que essa onde de lançar padrões diferentes, estava somente prejudicando eles mesmos, o que favoreceu a disseminação do IE na Internet.

Decidi migrar todo o meu ambiente para o TableLess, isto é, o que não precisa de dados tabulares, como formulários, apresentações de conteúdo e assim por diante. Não é um trabalho fácil, porque a documentação do CSS 2 não é clara como eu gostaria, não existem exemplos avançados e quem sabe fazer a coisa, não diz como que, mas isso são coisas da Internet... quem não quer puxar a brasa para a sua sardinha?

Analista de Sistemas, especialista de projetos para Internet desde 1993, projetista e mantenedor de diversos sites no Brasil, como os sites da FAMEM e Porto do Itaqui.

How To Change Your Car`s Motor Oil   By Stephen Bucaro

Friday, September 30th, 2005

———————————————————-
Permission is granted for the below article to forward,
reprint, distribute, use for ezine, newsletter, website,
offer as free bonus or part of a product for sale as long
as no changes are made and the byline, copyright, and the
resource box below is included.
———————————————————-

How to Change Your Car`s Motor Oil

By Stephen Bucaro

First, let`s answer the question; Why should you change
your own oil? Because you can save time and money. You
don`t have to wait in line at the service garage or quick
oil change shop. For ten bucks you can get the best oil
and a brand new oil filter. And, it`s so easy to do that
you could train a monkey to do it.

Changing your cars motor oil is a very simple three-step
process: 1. Drain the old oil. 2. Replace the oil filter.
3. Add the new oil. But before we go through the steps,
lets answer a few basic questions.

When should I change my oil?

Look in your cars owners manual. Most auto manufacturers
recommend changing the motor oil every 6,000 miles for
normal service, or every 3,000 miles for severe service.
I change my oil every 6,000 miles, and my engines run like
new when I trade my vehicles in with well over 100,000
miles on them. One thing that I do is change a new cars
oil after the first 300 mile break-in period. Then, after
that, I change the oil every 6,000 miles.

What kind of oil should I use?

You are not going to save money by using an off-brand oil
because your engine will wear out sooner. Use oil that
meets the American Pertroleum Institute (API)
classification SL. I use Valvoline, Quaker State, Pennzoil,
or Havoline brand oil. These quality oils contain additives
that make them work better and longer.

If you are changing your oil just before winter, use SAE
10W30 weight oil. This number means the oil will have a
thin 10 weight viscosity when the engine is cold, helping
the engine to start easier, and then the oil will thicken
to 30 weight viscosity when the engine warms up, protecting
the engine better. If you are changing oil just before
summer, use SAE 10W40 weight oil. The extra 40 weight
viscosity will protect your engine better when it`s hot.

What`s the First Step?

First let your engine cool off. Modern engines run at
close to 300 degrees (F) and hot oil will definitely give
you a severe burn. You shouldn`t have to jack your car up
unless you have some kind of ground hugging sports car or
low rider. Almost all cars have enough space underneath to
reach under and change the engine oil.

Step 1: Drain the old oil.

Locate the oil drain plug and place a pan under it to
catch the oil. With a box wrench, remove the oil plug.

Note for newbies: To remove the drain plug, turn it
counter-clockwise.

- If you have a GM dual-overhead-cam EcoTec engine you may
have a difficult time locating the drain plug on all that
aluminum.

When the oil stops draining, reinstall the drain plug.

Note for newbies: To replace the drain plug turn it
clockwise. Start the plug with your fingers. If it seems
even slightly hard to turn, back it out! You are crossing
the threads.

Step 2. Replace the oil filter.

Move your oil catch pan under the oil filter. Using an oil
filter wrench to get it started, remove the oil filter.
(newbies: counter-clockwise, and you will get some oil on
your hand.)

- A strap type oil filter wrench is the best kind to use.
A socket type oil filter tool is used with a ratchet just
like a regular socket. The problem with the socket type is
that it tends to get stuck on the filter. Use the socket
type tool if you don`t have enough clearance around the
oil filter to use the strap type.

With your finger put a thin coat of oil on the new filter`s
gasket to make it seal better.

*! Now pay attention – here`s were you can screw up royal!

With your hand, install the new oil filter. If it seems
even slightly hard to turn, back it out! You are crossing
the threads. Most filters have an instruction printed on
them to give the filter one more turn after the gasket has
made contact.

Here`s what I recommend: screw the filter on until its
`hand tight`. Then use the oil filter wrench to snug it up
another 1/8 to 1/4 turn. This is critical!

When the vehicle is running, the oil pump puts the oil
under pressure. If you don`t install the oil filter tight
enough, the oil will come gushing out. If that happens shut
down the engine immediately! Without oil, an engine will
lock up within seconds.

The first time I changed my oil, I used the filter wrench
to tighten the filter as tight as I could get it. Wrong!
The next time I went to change my oil, I couldn`t get the
filter off. Luckily I had plenty of room around the filer,
so I hammered a screw driver through the body of the
filter and used the handle of the screw driver to turn the
filter off.

Warning! Don`t over-tighten the filter. Follow the
instructions above carefully!

- The GM dual-overhead-cam EcoTec engine has an unusual
oil filter located on top of the engine. Remove the engine
air intake hose. That`s the oil filter canister just to
the right of, and below, the end of the open air intake
tube. Use a proper size wrench to remove the canister lid.
This engine uses a special filter cartridge.

Step 3. Add the new oil.

Locate the oil filler cap on the valve cover. I`ve seen
newbies pour motor oil in everything from the master brake
cylinder to the radiator cap. Make sure you have located
the the oil filler cap. Remove the oil filler cap.

When pouring the oil, you would be wise to use a funnel
between the oil can and the valve cover oil filler hole.

How much oil should you add? Look in your cars owner
manual. Most engines have a capacity of four or five
quarts. Don`t overfill the crank case. When you run the
engine the extra oil will be blown out through the PCV
value, possibly stalling your engine.

Tip: If you don`t know the oil capacity of the engine, add
four quarts, then check the oil level, if it`s a quart low
add another quart.

Replace the oil filler cap.

Step 4. Start the Engine.

Yes, I know, I said there where only three steps. You`re
finished, this is not really a `step`.

Start the engine and make sure the oil warning light goes
off. Look under the vehicle to make sure oil is not leaking
out. Turn off the engine and let it set for a minute to let
the oil drain down to the crank case. Then use the dip
stick to check the oil level.

How to check the oil level: Remove the dip stick, wipe it
clean with a rag, reinstall the dip stick. Make sure the
dip stick is in all the way or you will get a false reading.
After a few seconds remove the dip stick and examine how
far up the stick is covered with oil. Most dip sticks have
a `full` mark printed on them.

Note: I find the best way to dispose of the old oil is to
use a funnel to pore it from the collection pan into the
bottles from which the new oil came. When I get a big pile
of used oil bottles I bring them to the oil recycling
center. Be sure to mark the used oil bottles so you don`t
accidentally think they are new oil.

———————————————————-
Resource Box:
Copyright(C)2004 Bucaro TecHelp. To learn how to maintain
your computer and use it more effectively to design a Web
site and make money on the Web visit bucarotechelp.com
To subscribe to Bucaro TecHelp Newsletter visit
http://bucarotechelp.com/search/000800.asp
———————————————————-

To learn how to maintain your computer and use it more effectively to design a Web site and make money on the Web visit bucarotechelp.com To subscribe to Bucaro TecHelp Newsletter visit
http://bucarotechelp.com/search/000800.asp

Warm & Toasty Outdoors With Patio Heaters   By Nicholas Webb

Friday, September 30th, 2005

By: Nicholas Webb

Learn how to enjoy outdoor living all year long. Your friends and family will love this!

The Heat is On with Patio Heaters

Any outdoor lover will tell you that the right patio heater will allow you to extend your love of the open-air life all year round.

A 15-20 foot circle of heat can easily increase the outside temperature by 10-25 degrees Fahrenheit and that makes all the difference between having to stay inside and eating out.
As with most patio equipment, the choice of the right heater for your needs isn`t always such an immediate process. First thing to know is whether you really need or want one. Some factors to consider are your lifestyle. How often do you eat or entertain outside? What is the weather predominantly like?

Now a few words concerning your budget.

How much are you willing to spend for a patio heater?

Prices for free standing models generally start at around $200-$250 and can go up to and over the $1000 mark. For normal domestic use, most sources indicate a $300-$400 model as being perfect.

The more expensive models are generally intended for commercial use. The newer, better-made patio heaters offer a selection of safety features and temperature controls. They will allow you to entertain in the early spring evenings. Just take a family breakfast set outside, or simply have a barbecue anytime you feel like it.

Modern patio heaters are:

- so safe, you needn`t worry about fire
- very quiet
- really make having a patio or deck worthwhile

Freestanding heaters are usually about 7 feet tall and resemble a lamppost with a conical umbrella type housing on top. This helps radiate heat downwards. Some electric models are available but the majority use propane or natural gas, and these are by far the best type to consider. The gas canisters are contained in the base of the heater.

A quality patio or garden heater will generate around 45-50,000 BTUs, and that would be enough to keep you warm when you sit anywhere within a 20-foot diameter.

Most models now come with wheels, which facilitate moving your heater from one place to another while some even come with carrying cases. When it`s not in use, you can put the patio or deck heater in its carry case, or under an appropriate cover, and just wheel it away!

Many retailers are also able to offer smaller tabletop, or footstool, versions of the freestanding models.

So, apart from the price, the main things to look out for are the BTUs and temperature controls. The rest is really just design. Choose something you like … and prepare to enjoy more quality time outdoors.

In summary, garden or patio heaters will allow you to enjoy the outdoor life all year round.

Nicholas webb is the owner of http://www.allabout-patio-furniture.com A site that providing user-friendly patio furniture and patio accessories consumer tips and buying advice for the outdoor lover. Check it out before parting with your money.