herbal body wrap

just another regularban.info web blog

MEMBERS:

Using Functions

Functions are used to perform a well defined task that is normally repeated at various places within a web site, web application, or other software application. The function sometimes needs certain information before performing its task, and sometimes returns a value to the calling page or program.

An example of how to use a simple function in PHP:

 function showMessage() {

echo "{$_SESSION["message"]}"; }

The above example shows a very simple function that displays the contents of a session variable called 'message'. The idea being that while a user is using a web site, etc, various messages are generated and stored in the 'message' session variable. Whenever the showMessage function is called, the contents of the session variable are displayed. So, for example, when the user logs on, you could display a message saying that they have done so. Likewise, when they log off, a different message could be displayed.

Calling a function

To call the showMessage function, you would just need to include the line:

showMessage()

in the web page (wrapped in php tags to distinguish it from normall HTML).

Passing values to a function

Often, a function requires one or more input values in order to perform its task. For example, take the following example that takes two numbers as input, and adds them together. The result is then returned to the calling web page or program.

function addNumbers($number1,$number2) {

$answer = $number1 + $number2;

return $answer; }

In the calling program we would have something similar to the following:

$number1 = "5";
$number2 = "6";
$sumOfNumbers = addNumbers($number1,$number2);
echo "$sumOfNumbers";

Obviously, in a real program you would not have the numbers hardcoded like this, but they would be obtained from user input or by some other means. Notice also that although the name of the returned variable is $answer, the calling program makes no reference to that. We could, if we wanted to, change the calling program to:

$answer = addNumbers($number1,$number2);
echo "$answer";

which might make things slightly easier to understand.

About the Author: John Dixon is a web developer working for My Health Questions Matter, a company that helps users of the health service to ask the right questions when discussing their medical condition with health professionals. John is also interested in computer history, and maintains http://www.computernostalgia.net, a site dedicated to the history of the computer. John also provides web development services to large and small clients via his own company John Dixon Technology Limited.

 


Your CSS Code is Slowing Down Your Website - How To Optimize for Speed

Did you know that your css code could be slowing down your website? Did you also know that there is a free solution out there that can help you optimize or reformat your css code for speed and readability? This article is going to explain the benefits of optimizing your css code and the reasons why all web designers should be doing it. First we need to take into account the 2 reasons why you would want to reformat your css: readability and optimization.

Readability

Having nicely formatted css that easily readable is very helpful when you are developing a site. Most of us (me included) can get pretty sloppy when in a hurry to develop code, and a formatter can really help out to make it more readable.

On development teams where both Macs and PCs are used, sometimes line breaks are not read correctly across platforms and your css can end up all on one line. A formatter can help get your code looking pretty again.

Optimization

The opposite of readability is optimization. One problem with CSS is that it can get pretty file-size heavy when designing with it - especially on complex layouts. Optimizing your CSS will strip out all unnecessary characters and leave your CSS lean and mean.

Optimizing css is great to do once you've finished your site and don't plan to work on the design very much anymore.

The css formatter is a great tool because it can do both! You can format for readability while you are designing, optimize when you go live, and reformat it for readability if you ever need to work on it again. It's really a 'win win' thing to do.

Do you want to speed up your website? Format your css for free using the CSS Formatter and Optimizer...

DEVTRENCH is a Web Development Blog written for web designers and programmers who need need up to date tips and tricks on how to create great websites.

 


Simple Website Creation That Will Make You Money

As you know we are all fond of the easy things in life. We all like the path of least resistance. The easier we can find our way the better for us. The more complicated something appears the less we understand it and as consequence the less we like it.

With this in mind we need to approach the building of a website in a way that will avoid all of the above. Your website will need to be laid out in a way that understands the visitor's needs and addresses them clearly and concisely.

The question then becomes how to do this? When considering what subject to build your site around you will need to start your research on the forums relative to the topics of choice. For example if your passion relates to golf then you will need to visit forums where this subject is discussed.

Here you will need to look at what questions are being asked and where the people posting to this forum are having difficulty. Then you will need to get engaged and try and help. Here is how you could do this. Create a signature that links back to a free blog that asks the question "what is the biggest problem you face when it comes to golf"

On your free blog you could ask other questions. Your blog then can have a form where people can submit their questions. Of course you would need to offer them something to do this that will help their game and of course you will need to offer it for free.

Based on this you will be gathering actionable intelligence relative to your target market. With this information you can then build a website that addresses these concerns and provides a product that you are either affiliated with or that you have created yourself.

Now that you have this information you can build a real website that can generate a real income in multiple ways. You will want to build a site that is structured properly for the search engines and one which is easy to navigate for your visitors.

To conclude if you lay the groundwork properly then the rest will fall into place.

Watch These Free Videos At Site Build It Customer Reviews please allow time for the videos to load.

Learn how to publish a real website That works Site Build It Review. Sign Up for the free affiliates masters course.

http://www.lfdab.com/Site-Build-It-Customer-Reviews.php

 


Pages 
* About

Archives
    * February 2008
    * January 2008

Categories:
* Uncategorized

Last Updated:

regularban.info is proudly powered by WordPress MU running on  regularban.info.
Create a new blog and join in the fun!
Entries (RSS) and Comments (RSS).