|
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() {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) {In the calling program we would have something similar to the following: $number1 = "5"; 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); which might make things slightly easier to understand.
You Can Build Your Own Great Web Site
Last February, I received a call from a man in Wisconsin asking about my writing services. He was particularly interested in having me rewrite the copy on his Web site. I was very surprised and wondering how in the heck he got my name. Then he mentioned something about my being my Internet hosting service's "customer of the month." I was very pleasantly surprised. After I spoke with him, I logged onto my email and there was an e-newsletter from my host server. And, yes, I was the "customer of the month," and my Web site was the featured site for the month. Of course, I quickly hastened to my site and checked the traffic. I was up to over 300 visits to my home page for the morning, and the day was to end with 796 visits! I don't believe I'll ever see numbers like that again. I also received several other calls from people interested in my services. It wasn't a complete surprise that my site was featured. Last year, I had filled out a "success story" response form on the company's site. I was later interviewed and told that I would be used as a case study. But the case study never materialized so I had forgotten about it. Thus I was very pleased when my site landed in their e-newsletter as the featured site. My host is one of many companies where you can register domain names and get your business online. They will build a site for you; or, if you are cheap like me, you can build your own. When I began my business a few years ago, I waited a whole year for my brother who owns an ad agency in L.A. to professionally build my Web site for free. Now he's kind of successful, and he didn't get that way by doing a lot of free work for relatives. At the time, my server was doing a lot of radio advertising claiming you could "build your Web site in 20 minutes." One day after nagging my brother once more, he became exasperated and said, "Why don't you just build your own." So I did. I called the company and they provided templates and lots of help. I chose an animated template with a layout ideal for showcasing a portfolio. There was a bit of a learning curve. I had to play around and call for help a few times. It took me longer than 20 minutes; yet, technically, the commercial was accurate: you could really get a home page up with your contact info in 20 minutes. I believe I spent about 20 hours to get my Web site to the point where I was willing to "publish" it. One of the advantages I have found about building your own Web site is that you don't have to rely on an outside Web Master to update it. Sometimes those fellows are swamped and it can take awhile. If I want to put a new project in my online portfolio, I can do it in a few minutes. Or if I want to add something new to my list of services, I can quickly type it in and it's done. I found a huge difference in how I was perceived in the business community once I had a Web presence. Suddenly, I was taken seriously. These days when someone asks, "What's your Web address?" you should have it ready. And it should never be "under construction." Visitors find that very irritating. It's really not that hard to get a presentable Web site up. As I mentioned earlier, there are numerous places where you can go to build a Web site. Just Google "do it yourself Web site" and you will get numerous options. It is very inexpensive. My site costs me less than $100 a year for 20 pages. Some places are even cheaper. Compared to the thousands of dollars one can pay a Web designer, it's a sweet deal. That's not to say that I don't believe in professionally designed Web sites. I still want one with more bells and whistles. I'm just waiting on my brother. (Since initially writing this piece, my server has made the process even better. It's more professional, a lot more pages available ... and more bells and whistles.)
Learn How To Design and Build Websites With Dreamweaver
If you are considering building your own website and do not know anything about building or designing websites the fast way to learn is getting involved with a tutorial of some kind. Learn from somebody that already knows how things are done and just follow their examples as you start building your website. There are two way to go, you can find a e-book Dreamweaver course or a Video course where Dreamweaver is explained. Both ways will work it all up to you to find the best way that will help you get started the fastest, I have included a few mistakes that you want to avoid when building your first website with dreamweaver. 1) Splash pages Splash pages are the first pages you see when you arrive at a website, normally with a big image or something like this. These pages does not make much sense when building your site as you always have to keep in mind how does navigation works for my visitors and how does search engines like Google see my page. So if you can avoid it do not make a splash page as your index.htm page. 2) Banner advertisements If you want to make money with your website, then AdSense will make the most sense for your users, banner ads takes up a lot of space and history tells us that people do no click on them. So don't waist your space on banner ads. 3) Clear navigation Navigation on your website is very important for your customers but even more important for your search engine ranking. By making easy 1-click navigation is a must on all pages. If your customers do not know how to navigate your site people will not see what you want them to see. So forget flash and drop down menus 4) Clear indication of where the user is When visitors are deeply engrossed in browsing your site, you will want to make sure they know which part of the site they are in at that moment. That way, they will be able to browse relevant information or navigate to any section of the site easily. Don't confuse your visitors because confusion means "abandon ship"! 5) Avoid using audio on your site People will leave your site if they get loud audio from your site and they have to jump to turn down their speakers so avoid audio on your site. So use the Dreamweaver tutorial to learn website building and saves alot of money by doing it yourself. Even if you don't know HTML or anything about building your own website you can learn it really fast by using an online tutorial.
|
* About Archives
Categories:
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). |