Introductory PHP For Non-Programmers

When you started reading this sentence you assumed lo acabaría en inglés. However, I didn't finish in English. This begs the question, 'In which language did I finish?' Unless I tell you the language, you'd have to run around and compare the words against known words in order to learn that it was Spanish, but I'd bet you'd give up and move on first. Servers work much the same way; if you don't let it know the language it assumes you're speaking to someone else (the browser) and sends it along. Servers aren't even friendly enough to give it a whack and see how it comes out.

So, what's server-speak for "Here comes PHP!"? Well, it definitely looks foreign:

Sure. Whatever. It's no use telling the server you're speaking PHP because you only know how to say "I speak PHP". What's that going to do for you? Well, imagine you were visiting a scripts site and wondering how you could put today's date on your webpage when you come across the following little snippet:

To display the date on your webpage, find the area you want to put the date then insert the code below.

echo date('m/d/Y');

Now, you're equipped with 2 statements: "I'm going to be speaking PHP" and "Today's date is mm/dd/YYYY". You then edit the file you want to put the date in by inserting this code in the desired location: Put the file back on the server and you're date shows up exactly as the snippet said it would. Or does it?

If you got lucky, it showed up. If not, there's a little more to learn. There's actually more than one way to tell the server that PHP is coming and I've only covered one way - the other ways aren't necessary for you to know in order to use PHP on your site. Most servers require a bit more information first - they want the name of the file to say whether PHP is there or not. To tell the server that PHP is inside the file, you need to change the extension (the part after the dot) to php. Uh, sure, the extension. Does this guy speak English? YEP! lol. If that wasn't clear, let's illustrate by assuming your file was called index.html when you downloaded it to edit. Before you upload that file back to the server, you need to change "html" to "php", so that the file is called index.php. Without that change most servers won't even look for PHP. The nice thing is that even if a file ends in "php", the server still looks for those opening pieces saying "Here comes PHP!" before trying to read what follows in PHP and just sends everything back to the browser which is outside of PHP, so you don't hurt anything!

Tired of reading? Me too! And, we can only do a couple of things! Or can we? There are a lot of scripts out there which require you to copy and paste a little code here and there or to include a file. In those cases, you are now leaps and bounds ahead in getting them to work!

Jeremy Miller - Webmaster of Script Reference - The *NEW* PHP Reference & Tutorial Site For Non-Programmers

In The News:


pen paper and inkwell


cat break through


Lead Generation How to -- 10 Tips On Generating More Internet Sales Leads

Many millions of dollars are being wasted on promoting and... Read More

Now You Have a Web Site - Have You Ever Heard of Accessibility?

An accessible Web site is easily approached, easily understood, and... Read More

Why Your Business Needs a Website

Even with the steady growth of the World Wide Web,... Read More

KISS Your Website!

Many web developers today are starting to KISS their website,... Read More

Setting Up A CGI Script On Your Web Site

Before you set up any scripts you will need some... Read More

Writing Effective ALT Text For Images

Anyone who knows anything about web accessibility knows that images... Read More

Website Success is Key

The popular search engine Google indexes over 8 billion websites.... Read More

Topics to Add When Creating an Alternate and Modern Medicine Web Directory

Alternate medicine finds its own place in the hearts and... Read More

Ever Wondered What Challenges Other People With Their Web Site?

Have you ever wondered what challenges are faced by other... Read More

Disability Discrimination Act (DDA) & Web Accessibility

There's been widespread speculation about the new legislation being introduced... Read More

High Quality Website at Low Cost

Although designing a great web site is an important part... Read More

Maximizing ROI via Web Site Traffic Analysis

We are clearly well past the innocent "golden age" of... Read More

How to Listen on the Web

When building a relationship, listening is more important than talking.A... Read More

Web Designer? You Dont Need No Stinkin Web Designer!

RIVERSIDE, CA August 4, 2004 ?- "Historically, small business owners... Read More

Direct Sales and Your Corporate Website - A Creative Marketing Plan that Works!

Creatively marketing your corporate site takes time in the set... Read More

Why You Need a Website

You hear a great deal about the Internet these days... Read More

HTML Editors - How to Choose the Right One for Building Your Websites

There are lots of HTML editors on the market, however,... Read More

Cost Effective and Powerful Dynamic Websites w. Fantastico Web Hosting

If you are developing your website on a host that... Read More

Warning: The Truth About Having a Web Site!

If you don't have a web site yet, are thinking... Read More

You Don?t Have to be Amazon.com to Achieve 12% Conversion Rates!

That's right. According to a recent study by Nielsen/NetRatings, Amazon.com... Read More

Building a Web Site Requires the Right Software to Eliminate Headaches and Keep Money in Your Pocket

When most people build a web site, they think one... Read More

Where?s Your Web Site?

This simple question can take on several different forms, but... Read More

Why You Really Need Your Own Web Page In-order To Make Online Business!

How many Web Sites did you stumble over telling you... Read More

Traffic for Webmasters

"If you build it, they will come"; is an age... Read More

Improving Usability for Screen Reader Users

Simply ensuring your website is accessible to screen reader users... Read More

How to Get a Better Web Site ROI

Better Web Site ROIHow to increase your business profitability by... Read More

Give Your Business a Cash Infusion

Whether you have your own business already, or are looking... Read More

Revealing the Firefox Secret Used by Top Web Developers and Power-Browsers

Profiles are one of the best kept secrets around regarding... Read More

Improve Conversion Rates ? Load Times

Your site is getting traffic, but conversion rates are horrible.... Read More

Effective Webdesign

D.zigns dzignerwebs The Basics Before starting on... Read More

The Web: Your Window of Opportunity

Thinking about starting up a business? The web is the... Read More

Your Future Profit Is In The Stars

You don't believe in astrology but you check your horoscope... Read More

Getting a Web Site Can Be Fast, Easy, and Inexpensive When You Know Your Options

So what do you do if need to get a... Read More