Video tag in HTML 5

The <video> element is new in HTML 5 and allows you to, get this, play a movie in your website! The data of this element is supposed to be video but it might also have audio or images associated with it.

It works in all modern browsers (IE9 and above).

The ‘old’ way

Ugh, look at this horrid code:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="src" value="http://www.youtube.com/v/oHg5SJYRHA0&hl=en&fs=1&" />
<param name="allowfullscreen" value="true" />

</object>

Yuck. And as you know, you need Flash for this. Or it is often delivered via JavaScript as well so it is not perfect.

Continue reading

Advertisements

Connecting to a database using MySql

What is MySQL?

  • MySQL is a database system used on the web
  • MySQL is a database system that runs on a server
  • MySQL is ideal for both small and large applications
  • MySQL is very fast, reliable, and easy to use
  • MySQL supports standard SQL
  • MySQL compiles on a number of platforms
  • MySQL is free to download and use
  • MySQL is developed, distributed, and supported by Oracle Corporation
  • MySQL is named after co-founder Monty Widenius’s daughter: My

The data in MySQL is stored in tables. A table is a collection of related data, and it consists of columns
and rows.

Here’s a short video to explain the essentials of MySQL

Continue reading

Server side scripting. PHP.

What is PHP?

  • PHP is an acronym for “PHP Hypertext Preprocessor”
  • PHP is a widely-used, open source scripting language
  • PHP scripts are executed on the server
  • PHP costs nothing, it is free to download and use
PHP is an amazing and popular language!It is powerful enough to be at the core of the biggest
blogging system on the web (WordPress)!
It is deep enough to run the largest social network
(Facebook)!
It is also easy enough to be a beginner’s first server side
language!

 

 


What is a PHP File?

  • PHP files can contain text, HTML, CSS, JavaScript, and PHP code
  • PHP code are executed on the server, and the result is returned to the browser as plain HTML
  • PHP files have extension “.php

What Can PHP Do?

  • PHP can generate dynamic page content
  • PHP can create, open, read, write, delete, and close files on the server
  • PHP can collect form data
  • PHP can send and receive cookies
  • PHP can add, delete, modify data in your database
  • PHP can restrict users to access some pages on your website
  • PHP can encrypt data

With PHP you are not limited to output HTML. You can output images, PDF
files, and even Flash movies. You can also output any text, such as XHTML and
XML.


Why PHP?

  • PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.)
  • PHP is compatible with almost all servers used today (Apache, IIS, etc.)
  • PHP supports a wide range of databases
  • PHP is free. Download it from the official PHP resource:
    http://www.php.net
  • PHP is easy to learn and runs efficiently on the server side

 

Learning scripting with JavaScript

JavaScript (JS) is a dynamic computer programming language. It is most commonly used as part of web browsers, whose implementations allow client-side scripts to interact with the user, control the browser, communicate asynchronously, and alter thedocument content that is displayed. It is also being used in server-side network programming (with Node.js), game development and the creation of desktop and mobile applications.

JavaScript is classified as a prototype-based scripting language with dynamic typing and has first-class functions. This mix of features makes it a multi-paradigm language, supporting object-oriented,  imperative, and functional programming styles.

 

JavaScript can be used to create many functions and tools for a webpage. It is used to make the website look dynamic.