Archive for the 'Tutorials' Category

PHP Classes

Written by admin on Sunday, September 14th, 2008 in PHP Tutorials, Tutorials.

In PHP there are many methods of programming a script or website. Advanced programmers use something called classes. These help programmers to organize their code and also make the script more versatile. PHP classes were mainly used when PHP5 was introduced as PHP5 concentrated on advanced programmers with using classes and other methods of programming. By using classes functions can be manipulated and security can be increased from standard php methods. PHP classes or often refered to as OOP which stands for Object Orientated Programming because we are using objects to organise our code. PHP classes have many features to them and it would take to long to explain every feature of a class so were just going to look at the few basics of using and creating a PHP class.
(more…)

Getting User information in PHP

Written by admin on Tuesday, August 5th, 2008 in PHP Tutorials, Tutorials.

In the previous tutorial we showed you how to get a user’s IP using PHP. However there is a way that you can get vasts amount of information about the user in PHP. We will now teach you how to get all of this information.

Getting information about the website or visitor mainly depends on the $_SERVER variable. This is a pre-defined global variable in PHP that is always set and can be used anywhere. Below are the different types of information you can get from $_SERVER.

(more…)

Getting User’s IP in PHP

Written by admin on Saturday, May 17th, 2008 in PHP Tutorials, Tutorials.

Sometimes you may need to get a users IP that is browsing your website and store it for protection or display it to the user.

In PHP this is simply done by using the $_SERVER variable.

The code below will store a users IP into a variable:

<?php

$UsersIP = компютри$_SERVER[’REMOTE_ADDR];

?>

REMOTE_ADDR simply grabs the remote IP Adress being used.

Lots more info can be obtained this way. But that is how to grab a Users IP.

HTML Validation

Written by admin on Monday, May 12th, 2008 in Tutorials.

HTML Validation

Plain Text   view plain   expand/collapse
  1. <span style="color: #000000"> HTML validation is kept under maintenance by W3.org.</span>

HTML validation runs through your code to see if your HTML/xHTML coding is perfect and up to scratch.

To make sure your site is validated perfectly Make sure you have the following in your html document.

doc type
html tags
head tags
body tags
ommittags

DOC TYPES give the html document a type.

Example:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
The html tags are included in tis doc type.

Body tags are essential to a document as it keeps all layout coding where it is suppoed to be and lets the page know when to start displaying.

Head tags are for containing Page titles, links to style sheets and hosting css styles.

Ommittags are new to html and are considered xHTML.

They make tags close themselves without having the closing tag.

This is done by a slash “/”.

Examples are sown below:

<br /> instead of <br>

<img src=”" />
Following the steps above will make your html document valid.

You can validate your document by the
following url:

http://www.validator.w3.org

Colour Changing Tables

Written by admin on Thursday, May 8th, 2008 in Tutorials.

Okay. This isn’t all HTML, Its a bit of JavaScript but you will pick it up easily.

Right Plain tables can look boring and if there is a large amounts of rows with data alternating colours is not enough and it can get very annoying when you loose your place and can be stressful on the eyes.

So highlighting your table cells can be very helpful when reading down a list.

This tutorial will show you how to make a cell change colour (effectively highlight itself) when it is hovered over.

In your td tag place the following code:

Plain Text   view plain   expand/collapse

<td onMouseover=”this.bgColor=’#FFCC00′”>

This will make your cell change colour when its hovered over. The value in the single quotes is the colour it will go.

what it is doing is saying. When hovered over this cells bgcolor = #FFCC00.

But this colour will stay and will not disappear.
So we need to tell the cell what to do when its not hovered over.

(more…)



Site Navigation SEO Services