Collecting Data

So, ‘PHP’? ‘HTML’? What are these things and how can we use them?

HTML is the language of the web. It stands for Hyper Text Markup Language. It’s just a simple set of tags that tell the web browser information about the page. We then style this information using CSS – cascading styles sheets. We can also add behaviour – things like animation, error checking and all sorts of cool things using javascript. These three things, HTML, CSS and Javascript (or JS) all work together to create a static webpage.

Arrgghhhh!! So many letters flying around! It may be easier to think of it like this:

  • HTML is the information about the webpage. The data if you will
  • The CSS is the presentation. How it looks, colours and positioning
  • Javascript is behaviour added on top. Things like Animation and feedback upon submitting forms

So what is PHP?

PHP is a powerful tool for making dynamic web pages. For instance when you log into Amazon it says ‘welcome back’ and then your name. Amazon haven’t created millions and millions of html files each with a different name in! Instead the name is a variable, and the page is dynamic i.e it can change on the fly.

When you build HTML, it’s like you are a workman with a shovel digging a hole. PHP is like bringing in a JCB! It allows you to do things much faster, and to bring in data and perform calculations on it. It’s much like the difference between added things up in your head and using a calculator.

A great place to learn the basics of PHP, HTML, CSS and JS is:

w3schools.

It has some great resources and tutorials to get you started. We’d recommend going through the HTML tutorial before really getting stuck into our example survey. It should only take you about an half hour to grasp the basics.

Now we’ll look at how to store the data.