PHP. Introduction. PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are executed on the server

Size: px
Start display at page:

Download "PHP. Introduction. PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are executed on the server"

Transcription

1 PHP Introduction Hypertext Preprocessor is a widely used, general-purpose scripting language that was originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document. As a general-purpose programming language, PHP code is processed by an interpreter application in command-line mode performing desired operating system operations and producing program output on its standard output channel. It may also function as a graphical application. PHP is available as a processor for most modern web servers and as a standalone interpreter on most operating systems and computing platforms. PHP was originally created by Rasmus Lerdorf in 1995and has been in continuous development ever since. The main implementation of PHP is now produced by the PHP Group and serves as the de facto standard for PHP as there is no formal specification. PHP originally stood for personal home page. Its development began in 1994 when the Danish/Greenlandic programmer Rasmus Lerdorf initially created a set of Perl scripts he called 'Personal Home Page Tools' to maintain his personal homepage, including tasks such as displaying his résumé and recording how much traffic his page was receiving. PHP is a general-purpose scripting language that is especially suited to server-side web development where PHP generally runs on a web server. Any PHP code in a requested file is executed by the PHP runtime, usually to create dynamic web page content. It can also be used for command-line scripting and client-side GUI applications. PHP can be deployed on most web servers, many operating systems and platforms, and can be used with many relational database management systems (RDBMS). It is available free of charge, and the PHP Group provides the complete source code for users to build, customize and extend for their own use. PHP primarily acts as a filter, taking input from a file or stream containing text and/or PHP instructions and outputs another stream of data; most commonly the output will be HTML. Since PHP 4, the PHP parser compiles input to produce bytecode for processing by the Zend Engine, giving improved performance over its interpreter predecessor. Originally designed to create dynamic web pages, PHP now focuses mainly on server-side scripting, and it is similar to other server-side scripting languages that provide dynamic content from a web server to a client, such as Microsoft's Active Server Pages, Sun Microsystems' JavaServer Pages, and mod_perl. PHP has also attracted the development of many frameworks that provide building blocks and a design structure to promote rapid application development (RAD). Some of these include CakePHP, Symfony, CodeIgniter, and Zend Framework, offering features similar to other web application frameworks. PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are executed on the server 1

2 PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.) PHP is an open source software PHP is free to download and use PHP runs on different platforms (Windows, Linux, Unix, etc.) PHP is compatible with almost all servers used today (Apache, IIS, etc.) PHP is FREE to download from the official PHP resource: PHP is easy to learn and runs efficiently on the server side PHP File o PHP files can contain text, HTML tags and scripts o PHP files are returned to the browser as plain HTML o PHP files have a file extension of ".php", ".php3", or ".phtml" How PHP Works? PHP sits between your browser and the web server. When you type in the URL of a PHP website in your browser, your browser sends out a request to the web server. The web server then calls the PHP script on that page. The PHP module executes the script, which then sends out the result in the form of HTML back to your browser, which you see on the screen. Here is a basic php diagram which illustrate the process. php process Installing PHP on Windows Installing PHP is easy. You can install PHP on your computer easily with WAMP5. WAMP5 is an open source application which comes with with PHP5, Apache web server, MySQL database and phpmyadmin (mysql database administration program). You can install these items on your windows machine using WAMP5. Installing WAMP5 1. Download the latest version of WAMP5. 2. Run the installation wizard and follow the easy instructions to install WAMP5. 3. Once you're done installing WAMP5, please go to your folder where you installed wamp5. If you didn t specify which folder to install wamp during the installation wizard, then it should be installed in your C:/ drive, i.e. C:/wamp. 4. In your wamp directory you should see the following folders. 2

3 1. apache2 This is where the apache web server is installed. Apache will run our php code and scripts on the web browser. You will not need to do anything in this folder. 2. mysql This is where MySql databse is installed. MySQL is an open source database. PHP and MySQL work really well together. You can use PHP and MySql to store data. Don t worry, we will learn how to do all that in our tutorials. 3. php You guessed it. This is where php modules are stored. 4. www This is the root folder of our web server. This is where you are going to put all your php files and scripts. 5. wampserver.exe This file will run the WAMP program. We need to start WAMP everytime we want to work with PHP. So, go ahead and double click on this file. 5. Once you run the wamp server file, you will see a small icon on your windows tray. Right click on this icon and then click on Start All Services. This will start the apache web server along with everything we need to run PHP pages on our machine. 6. Now open up your web browser and type in You should see the WAMP welcome page. PHP Syntax Welcome! In this section we're going to learn how PHP and HTML works together. We are also going to build our first PHP web page. PHP is a web scripting language which means it was desgined to work with HTML. You can easily embed PHP code into your HTMl code. Hmmm! Nice but how do we do that? Simple. When writting php code, you enclose your PHP code in special php tags. This tells the browser that we're working with PHP. See below. //your php code goes here PHP and HTML Now let see how we blend PHP and HTML together. 3

4 <html> <title>my php page</title> <body> echo "hello there!"; </body> </html> Echo is a special statement in php for outputing data to the browser. This statement is more often used when we need to print something to the browser. You will learn how to use echo in as we go along. Note: Note that, at the end of each PHP statement we need need to put a semicolon, i.e. ";" as you see in the above code. Otherwise PHP will report syntax error. My First PHP Page Open up notepad. Copy paste the above PHP and HTML code in notepad. Now, let s save the file in our www folder, i.e. c:/wamp/www Name the file my_php_page.php and save it in your www folder. Now, go to in your web browser. You should see "hello there!" printed out on the browser. Example - Make Text Bold Replace the PHP line in your code to the following code. Save the file and now refresh your page. > echo "<b>hello there!</b>"; You should see hello there! in bold letters in your browser. Example - Make Text Green Replace the PHP line in your code to the following code. Save the file and now refresh your page. > echo "<font color='green'>hello there!</font>"; You should see hello there! in green in your browser. 4

5 Example - What's today's date? Lets print out today's date using the php date function. Don't worry we will see more examples of the date function in later tutorials. We will learn some useful techniques for printing date in different formats. For now, let's try the following code. echo "today is ".date('y-m-d'); Try it! Replace previous echo line with this line. You should see today's date, "today is ", printed out on your browser. PHP Variables A variable is a mean to store values such as strings or integers so we can easily reuse those values in our code. For example, we can store a string value such as "I Love PHP" or an integer value such as 100 into a variable. Whenever we need to use these values, we simply call that variable instead writing out those values over and over again in our code. Here is an example. $str="i love PHP"; //here is one variable with a string value echo $str; // here we print the $str value onto the browser $num = 100; //another variable with a integer value echo $num; // here we echo the $num variable to print its value echo $str; //here we reuse the $str variable to print its value again in our code echo $num; //here we reuse the $num variable to print its value again in our code The following code should print "I Love PHP100I Love PHP100". Try it. Copy the code in an empty file, save the file as php and run it on your browser. Variables in PHP Every language has its own semantics of defining variables. In PHP, we define a variable starting with a $ sign, then write the variable name and finally assign a value to it. Here is an example below. $variable_name = value; 5 You must add the $ sign when declaring variables, otherwise it will not work. It is advisable that when you define a variable, you must initilaize it by assign it a value.

6 Working with PHP Variables Few Naming Rules There are few things we need to note when working with PHP variables. A variable name should only start with underscore "_" or a letter. A variable can only contain letters, numbers or underscore. In another words, you can't use other funky characters like <^# in your variables names. Declaring a PHP Variable Let say we want to store values using variables in PHP. Here's how we do it. * First, think of a logical name for a variable. For example, if you we want to store the text of your company logo in a variable, the logical name for that variable would be something like $logo_text. Remember, you can name your variables whatever you like. But you must choose logical names so it is easier to remember what they are. * Assign that variable a value. * Remember to put the $ sign in front of the variable name. Example - PHP variable with a string value $logo_text = "Efficsys Infotech"; echo $logo_text; In the above code we define a variable name $logo_text, assign it a string value "Efficsys Infotech" and print its value onto the page. PHP Integer Variable Example - PHP variable with an integer value $number = 100; echo $number; In the above code we define a variable name $number, assign it an integer value of 100 and print its value onto the page. 6

7 PHP Float or Decimal Variable Example - PHP variable with a float or decimal value $decimal_number = ; printf("%.2f", $decimal_number); In the above code we define a variable name $decimal_number, assign it a decimal value of and print its value onto the page. Some key points to remember when declaring variables in PHP Remember to always put $ sign in front of variable names. That tells PHP that we're working with a variable. In PHP a variable name must start with a letter or an underscore followed by combination of letters, number or underscores. PHP variables are case sensitive, that means they could be either lower case or upper case or combination of both. You don't have to worry about declaring the type of the variable. For example strings and integers are declared the same way. It's good practice to initialize a variable i.e. assign it a value. Uninitialized variables in PHP have a value of either false, empty string or empty array. PHP Strings In programming, a string is a sequence of letters, symbols, characters and arithmetic values or combination of all tied together in single or double quotes. Example - PHP String $str = "Jayaram-Efficsys"; echo $str In the above example, we store the string value "Jayaram-Efficsys" in a variable name $str and use echo to output its value. PHP Strings Operators Concatenating Strings in PHP Sometimes while working with strings in our code, we need to join two strings. In PHP, you can use '.' to concatenate two or more strings together to form a single string. 7

8 Example 1 - Concatenating PHP Strings $str1 = "I Love PHP."; $str2 = "PHP is fun to learn."; echo $str1." ".$str2; In the above example we join $str1, empty string and $str2 to form a single string. The above code will output "I Love PHP. PHP is fun to learn." Example 2 - Concatenating PHP Strings Another way you to concatenate strings in PHP. $str1 = "I Love PHP."; $str2 = $str1." PHP is fun to learn."; echo $str2; In the above example we join $str1 with PHP is fun to learn." and set it $str2 to form a single string and echo str2. The above code will output the same value, "I Love PHP. PHP is fun to learn." as above. PHP Strings in Single and Double Quotes Strings in Double Quotes As we saw in our examples, strings are wrapped in double quotes. Using double quotes is the primary method. Double quotes allow us to escape specials characters in our string. For example, you can use a single quote with in double quotes. Special characters are escaped using backslash. Sometimes we need escape special characters in our strings. We will learn about in the following section. Example - String in Double Quotes $str = "It's a nice day today." echo $str; Notice the apostrophe. It's a special character which we didn't need to escape in double quotes. Strings in Single Quotes 8

9 Example - String in Single Quotes $str = 'This is a PHP string examples in single quotes'; echo $str; Single Quotes vs. Double Quotes Thou looking at single quote strings and double strings you may think there is any difference. However, there are reasons for using single quotes and doubles in a string. Single quotes should be used when outputting HTML code. Since HTML tag attributes use double quotes within themselves and since using double quotes in HTML tags is the convention, therefore it is advisable to use single quotes when wrapping a HTML code in PHP. Here's an example. Example - Single Quotes used for wrapping HTML Code echo '<input type="text" name="first_name" id="first_name">'; Double quotes are used when we want to use special characters in our strings such as new line characters \n and \r. Single quotes will treat them as regular characters. Also when printing a variable in a string, it is advisable to use double quotes. For example Example - Variable Wrapped in Double Quote String $name = "Matt"; echo "Hello $name!"; Escaping Special Characters As mentioned above we can escape characters in a string using backslash. An example would be using quotes inside quotes in a string. Let's have a look. Example - Escaping quotes with in quotes $str = "\"This is a PHP string examples in double quotes\""; echo $str; 9

10 Notice the \". We escaped the double quote using a backslash. The above code will output "This is a PHP string examples in double quotes" in double quotes. And same goes with single quotes. When you need to use single quotes within single quote, we need to escape it. $str = 'It\'s a nice day today.'; echo $str; In the above example we escaped the apostrophe using a backslash like this \'. Useful PHP String Functions Here we will list some of the commonly used PHP string functions. Example - strlen() Function This function returns the number of characters in a string. It takes a string as an argument. $str = "Hello!"; echo strlen($str); The above will output 6. Example - str_replace() Function This function replaces all occurrences of the search string in the main string with the replace string. Let's look at the example below. $str = "Hello! How are you today?"; echo str_replace("hello", "Hi", $str); In the above example, I'm saying replace the "Hello" with "Hi" in string $str. The above code will output "Hi! How are you today?" Example - strtoupper() Function This function converts all lower case letters to upper. $str = "hello!"; 10

11 echo strtoupper($str); The above example will output "HELLO!" Example - ucfirst() Function This function changes the first letter in the string to upper case. $str = "hello!"; echo ucfirst($str); The above example will output "Hello!" Example - trim() Function This function removes whitespace from the beginning and from the end of the string. $str = " hello! "; echo trim($str); The above example will output "hello!" PHP Operators In this section we going to cover different kinds of operators we use in programming. These operators are common to ever language. So, in PHP they are no different. In programming, we often perform arithmetic operations to calculate values. Below is the list of these operators with examples. Operator Name Example Output + Addition $num = 5+5; echo $num 10 - Subtraction $num = 5-5; echo $num 0 * Multiplication $num = 5*5; echo $num 25 11

12 / Division Comparison Operators $num = 5/5; echo $num 1 Comparison Operators prove very useful when checking the status of two variables or values. For example, if you wna tto check if one is equal to the other, we would use = operator. Comparasion operators are used in logic conditional statements (check PHP If...else section) to evalute if the condition is true or false. Operator Name Example Output > is greater than 6 > 5 First example returns true. 5 > 6 Second example returns false. < is less than 6 < 5 First example returns false. 5 < 6 Second example returns true. >= is greater than equal to 5>=4 Returns true <= is less than equal to 5<=4 Returns false = = is equal to 5 = = 4 Returns false!= is not equal to 5!= 4 Return true Logic Operators Logic operators can be used to combine two or more comparison statements combined into one statement to determine its status. For example, we can check to see if value A greater than value B and value B greater then value C. Let's check out some examples. Operator Name Example Output && And (6 > 5 && 1 < 7) Returns true Or (2 > 5 1 < 7) Returns true PHP If Else Statement Often in programming while writing code to solve problems, we require to perform certain actions based on certain conditions. For example, in our application, we might want to display different messages to the users on our page based on what day of the week it is. In order to handle this, we write what we call conditional statements where each action is performed based on a condition and when that condition is true if (condition) perform action 1 else perform action 2 12

13 The above pseudo-code translates... if the first condition is true, then perform action 1, otherwise, perform action 2. The If...Else Statement in PHP Let's examine some code to get an idea how conditional statements are done in PHP. In the following example, we evaluate what day of the week it is today. Based on that we display an appropriate message to the user. Example - If..Else Statement in PHP (wihtout curly brackets) <html> <body> $day = date("l"); if ($day == "Saturday") echo "It's party time :)"; else echo "Ahhh! I hate work days."; </body> </html> In the above example, we first determine what day of the week it is, then write a small if statement (conditional statement) to see if today is Saturday. If it is true, then the code will output "It's party time :)", else (if it is not saturday), the second condition will come true and the code will output "Ahhh! I hate work days.". PHP If Else Using Curly Brackets In the above example, we wrote one line of code inbetween the if and else statements. What if we want to write more than one line of code in there? Well, for that we will have to remember to use the "{" curly brackets. You must enclose the action part of the code in curly brackets. Failing to do that will cause an error. Let's tweak our first example to see how this is done. Example - IF Else Using Curly Brackets <html> <body> //Give what day of the week it is. Returns Sunday through Saturday. $day = date("l"); if ($day == "Saturday") { 13

14 } </body> </html> } else { echo "It's party time :)"; echo " Where are you going this evening?"; echo "Ahhh! I hate work days."; echo " I want weekend to come :)"; In the above example, we use the curly brackets to enclose the action part of the conditional statements when we have more than one line in there. The Elseif Statement in PHP In the above section, you saw how to write two conditional statements using "If and Else". What if we want to have more than two conditional statements? We can have as many conditional statements as we want in your code. To do that, we have to use "elseif" between our "if" and "else" statements. Let's say in our above example we also want to print a message for Fridays to our users saying "Have a nice weekend!". We would use the elseif clause to do that. Let's see how that is done. Example - The Elseif Statement <html> <body> //Give what day of the week it is. Returns Sunday through Saturday. $day = date("l"); if ($day == "Saturday") { echo "It's party time :)"; echo " Where are you going this evening?"; } elseif ($day == "Friday") { echo "Have a nice day!"; } else { echo "Ahhh! I hate work days."; echo " I want weekend to come :)"; 14

15 } </body> </html> Now the users will see "Have a nice day!" if the today is Friday PHP Switch Statement Switch statements are just like if..else conditional statements where a block of code is executed if the condition is true. I.e. Use the switch statement to select one of many blocks of code to be executed. Switch Statement Syntax switch (expression) { case case_1: //execute first block of code case case_2: //execute second block of code case case_3: //execute third block of code default: //execute this block of code if expression doesn't match any case } Switch statement should be used in the code when you want to evaluate different cases of a given scenario. The switch statement takes a single variable as input and then checks it against all cases we have in our switch statement. Let's imagine you own a computer retail store. Depending on the product name we want to display the price of that product. Now, instead writing separate if else statements for each product name, we simple use the PHP switch statement on the product name variable to evaluate which product we want to the display the price for. Let's have look at the example. Example - PHP Switch Statement <html> <body> 15

16 //set product name $product_name = "Processors"; switch ($product_name) { case "Video Cards": echo "Video cards range from $50 to $500"; case "Monitors": echo "LCD monitors range from $200 to $400"; case "Processors": echo "Intel processors range from $100 to $1000"; default: echo "Sorry, we don't carry $product_name in our catalog"; } </body> </html> The above switch statements evaluates the product name and displays the price range for that product. Since, we set the $product_name to "Processor", the above code outputs "Intel processors range from $100 to $1000". PHP Switch Statement: The default case What if someone asks for a product we don't carry? In that case, the default statement in switch code will be executed. In the example below we set the product name to "Undewear". Example- The Default Case in PHP Switch Statement <html> <body> //set product name $product_name = "NoteBooks"; switch ($product_name) { case "Video Cards": echo "Video cards range from $50 to $500"; 16

17 } case "Monitors": echo "LCD monitors range from $200 to $400"; case "Processors": echo "Intel processors range from $100 to $1000"; default: echo "Sorry, we don't carry $product_name in our cateloge"; </body> </html> The code will executed the default code block since we don't carry NoteBooks is not part of our switch statement cases. The code will output "Sorry, we don't carry NoteBooks in our catalog". PHP Switch Statement: The Break Statement The break statement in PHP switch code prevents the code from executing other cases in the switch statement. When a case is matched in a switch statement, the break statement basically stops the code execution. If the break statement is not there, then each case is executed. Consider the following example with two same product cases. Example- The Break Statement in PHP Switch Statement <html> <body> //set product name $product_name = "Processors"; switch ($product_name) { case "Video Cards": echo "Video cards range from $50 to $500"; case "Monitors": echo "LCD monitors range from $200 to $400"; case "Processors": echo "Intel processors range from $100 to $1000"; 17

18 } case "Processors": echo "AMD processors range from $100 to $1000"; </body> </html> As we can see in the above example, we don't have the break statement after each switch case and we have two cases for the product "Processors". So, the above code will evaluate both cases for "Processors". The code evaluates the first case and prints "Intel processors range from $100 to $1000" and then it goes to the next case and prints "AMD processors range from $100 to $1000". 18

Let's Look Back. We talked about how to create a form in HTML. Forms are one way to interact with users

Let's Look Back. We talked about how to create a form in HTML. Forms are one way to interact with users Introduction to PHP Let's Look Back We talked about how to create a form in HTML Forms are one way to interact with users Users can enter information into forms which can be used by you (programmer) We

More information

Chapter 7:- PHP. Compiled By:- Sanjay Patel Assistant Professor, SVBIT.

Chapter 7:- PHP. Compiled By:- Sanjay Patel Assistant Professor, SVBIT. Chapter 7:- PHP Compiled By:- Assistant Professor, SVBIT. Outline Starting to script on server side, Arrays, Function and forms, Advance PHP Databases:-Basic command with PHP examples, Connection to server,

More information

Web Engineering (Lecture 08) WAMP

Web Engineering (Lecture 08) WAMP Web Engineering (Lecture 08) WAMP By: Mr. Sadiq Shah Lecturer (CS) Class BS(IT)-6 th semester WAMP WAMP is all-in-one Apache/MySQL/PHP package WAMP stands for: i) Windows ii) iii) iv) Apache MySql PHP

More information

Web Application Development (WAD) V th Sem BBAITM(Unit-1) By: Binit Patel

Web Application Development (WAD) V th Sem BBAITM(Unit-1) By: Binit Patel Web Application Development (WAD) V th Sem BBAITM(Unit-1) By: Binit Patel Introduction: PHP (Hypertext Preprocessor) was invented by Rasmus Lerdorf in 1994. First it was known as Personal Home Page. Later

More information

Lecture 12. PHP. cp476 PHP

Lecture 12. PHP. cp476 PHP Lecture 12. PHP 1. Origins of PHP 2. Overview of PHP 3. General Syntactic Characteristics 4. Primitives, Operations, and Expressions 5. Control Statements 6. Arrays 7. User-Defined Functions 8. Objects

More information

What is PHP? [1] Figure 1 [1]

What is PHP? [1] Figure 1 [1] PHP What is PHP? [1] 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 is free to download and use Figure

More information

Introduction of PHP Created By: Umar Farooque Khan

Introduction of PHP Created By: Umar Farooque Khan 1 Introduction of PHP Created By: Umar Farooque Khan 2 What is PHP? PHP stand for hypertext pre-processor. PHP is a general purpose server side scripting language that is basically used for web development.

More information

Lecture 05 I/O statements Printf, Scanf Simple statements, Compound statements

Lecture 05 I/O statements Printf, Scanf Simple statements, Compound statements Programming, Data Structures and Algorithms Prof. Shankar Balachandran Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 05 I/O statements Printf, Scanf Simple

More information

The PHP language. Teaching you everything about PHP? Not exactly Goal: teach you how to interact with a database via web

The PHP language. Teaching you everything about PHP? Not exactly Goal: teach you how to interact with a database via web Web programming The PHP language Our objective Teaching you everything about PHP? Not exactly Goal: teach you how to interact with a database via web Access data inserted by users into HTML forms Interact

More information

Agenda. 1. Brief History of PHP. 2. Getting started. 3. Examples

Agenda. 1. Brief History of PHP. 2. Getting started. 3. Examples PHP An Introduction Agenda 1. Brief History of PHP 2. Getting started 3. Examples Brief History of PHP PHP (PHP: Hypertext Preprocessor) was created by Rasmus Lerdorf in 1994. It was initially developed

More information

PHP 5 Introduction. What You Should Already Know. What is PHP? What is a PHP File? What Can PHP Do? Why PHP?

PHP 5 Introduction. What You Should Already Know. What is PHP? What is a PHP File? What Can PHP Do? Why PHP? PHP 5 Introduction What You Should Already Know you should have a basic understanding of the following: HTML CSS What is PHP? PHP is an acronym for "PHP: Hypertext Preprocessor" PHP is a widely-used, open

More information

BEGINNER PHP Table of Contents

BEGINNER PHP Table of Contents Table of Contents 4 5 6 7 8 9 0 Introduction Getting Setup Your first PHP webpage Working with text Talking to the user Comparison & If statements If & Else Cleaning up the game Remembering values Finishing

More information

Lecture 7 PHP Basics. Web Engineering CC 552

Lecture 7 PHP Basics. Web Engineering CC 552 Lecture 7 PHP Basics Web Engineering CC 552 Overview n Overview of PHP n Syntactic Characteristics n Primitives n Output n Control statements n Arrays n Functions n WampServer Origins and uses of PHP n

More information

Princess Nourah bint Abdulrahman University. Computer Sciences Department

Princess Nourah bint Abdulrahman University. Computer Sciences Department Princess Nourah bint Abdulrahman University Computer Sciences Department 1 And use http://www.w3schools.com/ PHP Part 1 Objectives Introduction to PHP Computer Sciences Department 4 Introduction HTML CSS

More information

PHP and MySQL for Dynamic Web Sites. Intro Ed Crowley

PHP and MySQL for Dynamic Web Sites. Intro Ed Crowley PHP and MySQL for Dynamic Web Sites Intro Ed Crowley Class Preparation If you haven t already, download the sample scripts from: http://www.larryullman.com/books/phpand-mysql-for-dynamic-web-sitesvisual-quickpro-guide-4thedition/#downloads

More information

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 3: SEP. 13TH INSTRUCTOR: JIAYIN WANG

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 3: SEP. 13TH INSTRUCTOR: JIAYIN WANG CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 3: SEP. 13TH INSTRUCTOR: JIAYIN WANG 1 Notice Reading Assignment Chapter 1: Introduction to Java Programming Homework 1 It is due this coming Sunday

More information

PHP 1. Introduction Temasek Polytechnic

PHP 1. Introduction Temasek Polytechnic PHP 1 Introduction Temasek Polytechnic Background Open Source Apache License Free to redistribute with/without source code http://www.apache.org/license.txt Backed by Zend Corporation http://www.zend.com

More information

URLs and web servers. Server side basics. URLs and web servers (cont.) URLs and web servers (cont.) Usually when you type a URL in your browser:

URLs and web servers. Server side basics. URLs and web servers (cont.) URLs and web servers (cont.) Usually when you type a URL in your browser: URLs and web servers 2 1 Server side basics http://server/path/file Usually when you type a URL in your browser: Your computer looks up the server's IP address using DNS Your browser connects to that IP

More information

PHP. Interactive Web Systems

PHP. Interactive Web Systems PHP Interactive Web Systems PHP PHP is an open-source server side scripting language. PHP stands for PHP: Hypertext Preprocessor One of the most popular server side languages Second most popular on GitHub

More information

Server side basics CS380

Server side basics CS380 1 Server side basics URLs and web servers 2 http://server/path/file Usually when you type a URL in your browser: Your computer looks up the server's IP address using DNS Your browser connects to that IP

More information

BASIC COMPUTATION. public static void main(string [] args) Fundamentals of Computer Science I

BASIC COMPUTATION. public static void main(string [] args) Fundamentals of Computer Science I BASIC COMPUTATION x public static void main(string [] args) Fundamentals of Computer Science I Outline Using Eclipse Data Types Variables Primitive and Class Data Types Expressions Declaration Assignment

More information

Chapter 17. Fundamental Concepts Expressed in JavaScript

Chapter 17. Fundamental Concepts Expressed in JavaScript Chapter 17 Fundamental Concepts Expressed in JavaScript Learning Objectives Tell the difference between name, value, and variable List three basic data types and the rules for specifying them in a program

More information

PHP Personal Home Page PHP: Hypertext Preprocessor (Lecture 35-37)

PHP Personal Home Page PHP: Hypertext Preprocessor (Lecture 35-37) PHP Personal Home Page PHP: Hypertext Preprocessor (Lecture 35-37) A Server-side Scripting Programming Language An Introduction What is PHP? PHP stands for PHP: Hypertext Preprocessor. It is a server-side

More information

Important Points about PHP:

Important Points about PHP: Important Points about PHP: PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language that is embedded in HTML. It is used to manage dynamic content, databases, session tracking,

More information

COMS 469: Interactive Media II

COMS 469: Interactive Media II COMS 469: Interactive Media II Agenda Project One PHP Preview Project One Grading Methodology Return Project One & Evaluation Sheet Project One Evaluation Methodology Consider each project in and of itself

More information

Features of C. Portable Procedural / Modular Structured Language Statically typed Middle level language

Features of C. Portable Procedural / Modular Structured Language Statically typed Middle level language 1 History C is a general-purpose, high-level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at Bell Labs. C was originally first implemented on the DEC

More information

Web Scripting using PHP

Web Scripting using PHP Web Scripting using PHP Server side scripting No Scripting example - how it works... User on a machine somewhere Server machine So what is a Server Side Scripting Language? Programming language code embedded

More information

printf( Please enter another number: ); scanf( %d, &num2);

printf( Please enter another number: ); scanf( %d, &num2); CIT 593 Intro to Computer Systems Lecture #13 (11/1/12) Now that we've looked at how an assembly language program runs on a computer, we're ready to move up a level and start working with more powerful

More information

PHP Introduction. Some info on MySQL which we will cover in the next workshop...

PHP Introduction. Some info on MySQL which we will cover in the next workshop... PHP and MYSQL PHP Introduction PHP is a recursive acronym for PHP: Hypertext Preprocessor -- It is a widely-used open source general-purpose serverside scripting language that is especially suited for

More information

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming Intro to Programming Unit 7 Intro to Programming 1 What is Programming? 1. Programming Languages 2. Markup vs. Programming 1. Introduction 2. Print Statement 3. Strings 4. Types and Values 5. Math Externals

More information

Scripting Languages. Diana Trandabăț

Scripting Languages. Diana Trandabăț Scripting Languages Diana Trandabăț Master in Computational Linguistics - 1 st year 2017-2018 Today s lecture What is Perl? How to install Perl? How to write Perl progams? How to run a Perl program? perl

More information

PHP: The Basics CISC 282. October 18, Approach Thus Far

PHP: The Basics CISC 282. October 18, Approach Thus Far PHP: The Basics CISC 282 October 18, 2017 Approach Thus Far User requests a webpage (.html) Server finds the file(s) and transmits the information Browser receives the information and displays it HTML,

More information

CS2900 Introductory Programming with Python and C++ Kevin Squire LtCol Joel Young Fall 2007

CS2900 Introductory Programming with Python and C++ Kevin Squire LtCol Joel Young Fall 2007 CS2900 Introductory Programming with Python and C++ Kevin Squire LtCol Joel Young Fall 2007 Course Web Site http://www.nps.navy.mil/cs/facultypages/squire/cs2900 All course related materials will be posted

More information

UNIT - I. Introduction to C Programming. BY A. Vijay Bharath

UNIT - I. Introduction to C Programming. BY A. Vijay Bharath UNIT - I Introduction to C Programming Introduction to C C was originally developed in the year 1970s by Dennis Ritchie at Bell Laboratories, Inc. C is a general-purpose programming language. It has been

More information

Developing Online Databases and Serving Biological Research Data

Developing Online Databases and Serving Biological Research Data Developing Online Databases and Serving Biological Research Data 1 Last Time HTML Hypertext Markup Language Used to build web pages Static, and can't change the way it presents itself based off of user

More information

age = 23 age = age + 1 data types Integers Floating-point numbers Strings Booleans loosely typed age = In my 20s

age = 23 age = age + 1 data types Integers Floating-point numbers Strings Booleans loosely typed age = In my 20s Intro to Python Python Getting increasingly more common Designed to have intuitive and lightweight syntax In this class, we will be using Python 3.x Python 2.x is still very popular, and the differences

More information

Dynamism and Detection

Dynamism and Detection 1 Dynamism and Detection c h a p t e r ch01 Page 1 Wednesday, June 23, 1999 2:52 PM IN THIS CHAPTER Project I: Generating Platform-Specific Content Project II: Printing Copyright Information and Last-Modified

More information

TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA

TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA 1 TOPIC 2 INTRODUCTION TO JAVA AND DR JAVA Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach by M. Guzdial and B. Ericson, and instructor materials prepared

More information

Instructor s Notes Web Data Management PHP Sequential Processing Syntax. Web Data Management PHP Sequential Processing Syntax

Instructor s Notes Web Data Management PHP Sequential Processing Syntax. Web Data Management PHP Sequential Processing Syntax Instructor s Web Data Management PHP Sequential Processing Syntax Web Data Management 152-155 PHP Sequential Processing Syntax Quick Links & Text References PHP tags in HTML Pages Comments Pages 48 49

More information

COMP-202 Unit 2: Java Basics. CONTENTS: Using Expressions and Variables Types Strings Methods

COMP-202 Unit 2: Java Basics. CONTENTS: Using Expressions and Variables Types Strings Methods COMP-202 Unit 2: Java Basics CONTENTS: Using Expressions and Variables Types Strings Methods Assignment 1 Assignment 1 posted on WebCt and course website. It is due May 18th st at 23:30 Worth 6% Part programming,

More information

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG 1 Notice Class Website http://www.cs.umb.edu/~jane/cs114/ Reading Assignment Chapter 1: Introduction to Java Programming

More information

Web Scripting using PHP

Web Scripting using PHP Web Scripting using PHP Server side scripting So what is a Server Side Scripting Language? Programming language code embedded into a web page PERL PHP PYTHON ASP Different ways of scripting the Web Programming

More information

CMPT 100 : INTRODUCTION TO

CMPT 100 : INTRODUCTION TO CMPT 100 : INTRODUCTION TO COMPUTING TUTORIAL #5 : JAVASCRIPT 2 GUESSING GAME 1 By Wendy Sharpe BEFORE WE GET STARTED... If you have not been to the first tutorial introduction JavaScript then you must

More information

Basic Programming Language Syntax

Basic Programming Language Syntax Java Created in 1990 by Sun Microsystems. Free compiler from Sun, commercial from many vendors. We use free (Sun) Java on UNIX. Compiling and Interpreting...are processes of translating a high-level programming

More information

CSC Web Programming. Introduction to JavaScript

CSC Web Programming. Introduction to JavaScript CSC 242 - Web Programming Introduction to JavaScript JavaScript JavaScript is a client-side scripting language the code is executed by the web browser JavaScript is an embedded language it relies on its

More information

Course Wiki. Today s Topics. Web Resources. Amazon EC2. Linux. Apache PHP. Workflow and Tools. Extensible Networking Platform 1

Course Wiki. Today s Topics. Web Resources. Amazon EC2. Linux. Apache PHP. Workflow and Tools. Extensible Networking Platform 1 Today s Topics Web Resources Amazon EC2 Linux Apache PHP Workflow and Tools Extensible Networking Platform 1 1 - CSE 330 Creative Programming and Rapid Prototyping Course Wiki Extensible Networking Platform

More information

VARIABLES. Aim Understanding how computer programs store values, and how they are accessed and used in computer programs.

VARIABLES. Aim Understanding how computer programs store values, and how they are accessed and used in computer programs. Lesson 2 VARIABLES Aim Understanding how computer programs store values, and how they are accessed and used in computer programs. WHAT ARE VARIABLES? When you input data (i.e. information) into a computer

More information

CS101 Introduction to Programming Languages and Compilers

CS101 Introduction to Programming Languages and Compilers CS101 Introduction to Programming Languages and Compilers In this handout we ll examine different types of programming languages and take a brief look at compilers. We ll only hit the major highlights

More information

Hello everyone! Page 1. Your folder should look like this. To start with Run your XAMPP app and start your Apache and MySQL.

Hello everyone! Page 1. Your folder should look like this. To start with Run your XAMPP app and start your Apache and MySQL. Hello everyone! Welcome to our PHP + MySQL (Easy to learn) E.T.L. free online course Hope you have installed your XAMPP? And you have created your forms inside the studio file in the htdocs folder using

More information

JME Language Reference Manual

JME Language Reference Manual JME Language Reference Manual 1 Introduction JME (pronounced jay+me) is a lightweight language that allows programmers to easily perform statistic computations on tabular data as part of data analysis.

More information

Python for Non-programmers

Python for Non-programmers Python for Non-programmers A Gentle Introduction 1 Yann Tambouret Scientific Computing and Visualization Information Services & Technology Boston University 111 Cummington St. yannpaul@bu.edu Winter 2013

More information

Fachgebiet Technische Informatik, Joachim Zumbrägel

Fachgebiet Technische Informatik, Joachim Zumbrägel Computer Network Lab 2017 Fachgebiet Technische Informatik, Joachim Zumbrägel Overview Internet Internet Protocols Fundamentals about HTTP Communication HTTP-Server, mode of operation Static/Dynamic Webpages

More information

2 rd class Department of Programming. OOP with Java Programming

2 rd class Department of Programming. OOP with Java Programming 1. Structured Programming and Object-Oriented Programming During the 1970s and into the 80s, the primary software engineering methodology was structured programming. The structured programming approach

More information

Mysql Tutorial Show Table Like Name Not >>>CLICK HERE<<<

Mysql Tutorial Show Table Like Name Not >>>CLICK HERE<<< Mysql Tutorial Show Table Like Name Not SHOW TABLES LIKE '%shop%' And the command above is not working as Table name and next SHOW CREATE TABLEcommand user889349 Apr 18. If you do not want to see entire

More information

12/22/11. Java How to Program, 9/e. Help you get started with Eclipse and NetBeans integrated development environments.

12/22/11. Java How to Program, 9/e. Help you get started with Eclipse and NetBeans integrated development environments. Java How to Program, 9/e Education, Inc. All Rights Reserved. } Java application programming } Use tools from the JDK to compile and run programs. } Videos at www.deitel.com/books/jhtp9/ Help you get started

More information

Overview: Programming Concepts. Programming Concepts. Names, Values, And Variables

Overview: Programming Concepts. Programming Concepts. Names, Values, And Variables Chapter 18: Get With the Program: Fundamental Concepts Expressed in JavaScript Fluency with Information Technology Third Edition by Lawrence Snyder Overview: Programming Concepts Programming: Act of formulating

More information

Overview: Programming Concepts. Programming Concepts. Chapter 18: Get With the Program: Fundamental Concepts Expressed in JavaScript

Overview: Programming Concepts. Programming Concepts. Chapter 18: Get With the Program: Fundamental Concepts Expressed in JavaScript Chapter 18: Get With the Program: Fundamental Concepts Expressed in JavaScript Fluency with Information Technology Third Edition by Lawrence Snyder Overview: Programming Concepts Programming: Act of formulating

More information

Programming for Engineers Introduction to C

Programming for Engineers Introduction to C Programming for Engineers Introduction to C ICEN 200 Spring 2018 Prof. Dola Saha 1 Simple Program 2 Comments // Fig. 2.1: fig02_01.c // A first program in C begin with //, indicating that these two lines

More information

Web Server Setup Guide

Web Server Setup Guide SelfTaughtCoders.com Web Server Setup Guide How to set up your own computer for web development. Setting Up Your Computer for Web Development Our web server software As we discussed, our web app is comprised

More information

Lecture 5. Monday, February 1, 2016

Lecture 5. Monday, February 1, 2016 Lecture 5 Monday, February 1, 2016 === and!== In an example last week, we talked about how PHP does not check type when doing comparisons (so 1.0 == "1.0" is true) PHP calls this type juggling it juggles

More information

MITOCW watch?v=flgjisf3l78

MITOCW watch?v=flgjisf3l78 MITOCW watch?v=flgjisf3l78 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high-quality educational resources for free. To

More information

Preview from Notesale.co.uk Page 6 of 52

Preview from Notesale.co.uk Page 6 of 52 Binary System: The information, which it is stored or manipulated by the computer memory it will be done in binary mode. RAM: This is also called as real memory, physical memory or simply memory. In order

More information

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1)

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 1 Professional Program: Data Administration and Management JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) WHO

More information

Getting started with C++ (Part 2)

Getting started with C++ (Part 2) Getting started with C++ (Part 2) CS427: Elements of Software Engineering Lecture 2.2 11am, 16 Jan 2012 CS427 Getting started with C++ (Part 2) 1/22 Outline 1 Recall from last week... 2 Recall: Output

More information

First Java Program - Output to the Screen

First Java Program - Output to the Screen First Java Program - Output to the Screen These notes are written assuming that the reader has never programmed in Java, but has programmed in another language in the past. In any language, one of the

More information

PHP by Pearson Education, Inc. All Rights Reserved.

PHP by Pearson Education, Inc. All Rights Reserved. PHP 1992-2012 by Pearson Education, Inc. All Client-side Languages User-agent (web browser) requests a web page JavaScript is executed on PC http request Can affect the Browser and the page itself http

More information

Programming language components

Programming language components Programming language components syntax: grammar rules for defining legal statements what's grammatically legal? how are things built up from smaller things? semantics: what things mean what do they compute?

More information

These are notes for the third lecture; if statements and loops.

These are notes for the third lecture; if statements and loops. These are notes for the third lecture; if statements and loops. 1 Yeah, this is going to be the second slide in a lot of lectures. 2 - Dominant language for desktop application development - Most modern

More information

Civil Engineering Computation

Civil Engineering Computation Civil Engineering Computation First Steps in VBA Homework Evaluation 2 1 Homework Evaluation 3 Based on this rubric, you may resubmit Homework 1 and Homework 2 (along with today s homework) by next Monday

More information

2SKILL. Variables Lesson 6. Remembering numbers (and other stuff)...

2SKILL. Variables Lesson 6. Remembering numbers (and other stuff)... Remembering numbers (and other stuff)... Let s talk about one of the most important things in any programming language. It s called a variable. Don t let the name scare you. What it does is really simple.

More information

Contents. Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual

Contents. Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual Contents 1 Introduction...2 2 Lexical Conventions...2 3 Types...3 4 Syntax...3 5 Expressions...4 6 Declarations...8 7 Statements...9

More information

Discussion 1H Notes (Week 2, 4/8) TA: Brian Choi Section Webpage:

Discussion 1H Notes (Week 2, 4/8) TA: Brian Choi Section Webpage: Discussion 1H Notes (Week 2, 4/8) TA: Brian Choi (schoi@cs.ucla.edu) Section Webpage: http://www.cs.ucla.edu/~schoi/cs31 Variables You have to instruct your computer every little thing it needs to do even

More information

Python for Analytics. Python Fundamentals RSI Chapters 1 and 2

Python for Analytics. Python Fundamentals RSI Chapters 1 and 2 Python for Analytics Python Fundamentals RSI Chapters 1 and 2 Learning Objectives Theory: You should be able to explain... General programming terms like source code, interpreter, compiler, object code,

More information

Course Syllabus. Course Title. Who should attend? Course Description. PHP ( Level 1 (

Course Syllabus. Course Title. Who should attend? Course Description. PHP ( Level 1 ( Course Title PHP ( Level 1 ( Course Description PHP '' Hypertext Preprocessor" is the most famous server-side programming language in the world. It is used to create a dynamic website and it supports many

More information

2.1. Chapter 2: Parts of a C++ Program. Parts of a C++ Program. Introduction to C++ Parts of a C++ Program

2.1. Chapter 2: Parts of a C++ Program. Parts of a C++ Program. Introduction to C++ Parts of a C++ Program Chapter 2: Introduction to C++ 2.1 Parts of a C++ Program Copyright 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 2-1 Parts of a C++ Program Parts of a C++ Program // sample C++ program

More information

JAVASCRIPT - CREATING A TOC

JAVASCRIPT - CREATING A TOC JAVASCRIPT - CREATING A TOC Problem specification - Adding a Table of Contents. The aim is to be able to show a complete novice to HTML, how to add a Table of Contents (TOC) to a page inside a pair of

More information

Pace University. Fundamental Concepts of CS121 1

Pace University. Fundamental Concepts of CS121 1 Pace University Fundamental Concepts of CS121 1 Dr. Lixin Tao http://csis.pace.edu/~lixin Computer Science Department Pace University October 12, 2005 This document complements my tutorial Introduction

More information

Scripting Languages TCL: Tool Command Language

Scripting Languages TCL: Tool Command Language History: Scripting Languages TCL: Tool Command Language 1987 Dr John Ousterhout plays with the idea of creating an embeddable command language so that all his little tools have the same language. Wanted

More information

EECS1012. Net-centric Introduction to Computing. Crash Course on PHP

EECS1012. Net-centric Introduction to Computing. Crash Course on PHP EECS 1012 EECS1012 Net-centric Introduction to Computing Crash Course on PHP Acknowledgements Contents are adapted from web lectures for Web Programming Step by Step, by M. Stepp, J. Miller, and V. Kirst.

More information

C: How to Program. Week /Mar/05

C: How to Program. Week /Mar/05 1 C: How to Program Week 2 2007/Mar/05 Chapter 2 - Introduction to C Programming 2 Outline 2.1 Introduction 2.2 A Simple C Program: Printing a Line of Text 2.3 Another Simple C Program: Adding Two Integers

More information

IDM 232. Scripting for Interactive Digital Media II. IDM 232: Scripting for IDM II 1

IDM 232. Scripting for Interactive Digital Media II. IDM 232: Scripting for IDM II 1 IDM 232 Scripting for Interactive Digital Media II IDM 232: Scripting for IDM II 1 PHP HTML-embedded scripting language IDM 232: Scripting for IDM II 2 Before we dive into code, it's important to understand

More information

CSCB20 Week 8. Introduction to Database and Web Application Programming. Anna Bretscher* Winter 2017

CSCB20 Week 8. Introduction to Database and Web Application Programming. Anna Bretscher* Winter 2017 CSCB20 Week 8 Introduction to Database and Web Application Programming Anna Bretscher* Winter 2017 *thanks to Alan Rosselet for providing the slides these are adapted from. Web Programming We have seen

More information

Starting with a great calculator... Variables. Comments. Topic 5: Introduction to Programming in Matlab CSSE, UWA

Starting with a great calculator... Variables. Comments. Topic 5: Introduction to Programming in Matlab CSSE, UWA Starting with a great calculator... Topic 5: Introduction to Programming in Matlab CSSE, UWA! MATLAB is a high level language that allows you to perform calculations on numbers, or arrays of numbers, in

More information

Principles of Compiler Design Prof. Y. N. Srikant Department of Computer Science and Automation Indian Institute of Science, Bangalore

Principles of Compiler Design Prof. Y. N. Srikant Department of Computer Science and Automation Indian Institute of Science, Bangalore (Refer Slide Time: 00:20) Principles of Compiler Design Prof. Y. N. Srikant Department of Computer Science and Automation Indian Institute of Science, Bangalore Lecture - 4 Lexical Analysis-Part-3 Welcome

More information

QUark Language Reference Manual

QUark Language Reference Manual QUark Language Reference Manual Daria Jung (djj2115), Jamis Johnson (jmj2180), Jim Fan (lf2422), Parthiban Loganathan (pl2487) Introduction This is the reference manual for QUark, a high level language

More information

6.096 Introduction to C++

6.096 Introduction to C++ MIT OpenCourseWare http://ocw.mit.edu 6.096 Introduction to C++ January (IAP) 2009 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 6.096 Lecture 3 Notes

More information

SPARK-PL: Introduction

SPARK-PL: Introduction Alexey Solovyev Abstract All basic elements of SPARK-PL are introduced. Table of Contents 1. Introduction to SPARK-PL... 1 2. Alphabet of SPARK-PL... 3 3. Types and variables... 3 4. SPARK-PL basic commands...

More information

Programming In Java Prof. Debasis Samanta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Programming In Java Prof. Debasis Samanta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Programming In Java Prof. Debasis Samanta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 06 Demonstration II So, in the last lecture, we have learned

More information

(Refer Slide Time: 01:40)

(Refer Slide Time: 01:40) Internet Technology Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture No #25 Javascript Part I Today will be talking about a language

More information

Typescript on LLVM Language Reference Manual

Typescript on LLVM Language Reference Manual Typescript on LLVM Language Reference Manual Ratheet Pandya UNI: rp2707 COMS 4115 H01 (CVN) 1. Introduction 2. Lexical Conventions 2.1 Tokens 2.2 Comments 2.3 Identifiers 2.4 Reserved Keywords 2.5 String

More information

CMPT 120 Basics of Python. Summer 2012 Instructor: Hassan Khosravi

CMPT 120 Basics of Python. Summer 2012 Instructor: Hassan Khosravi CMPT 120 Basics of Python Summer 2012 Instructor: Hassan Khosravi Python A simple programming language to implement your ideas Design philosophy emphasizes code readability Implementation of Python was

More information

JavaScript CS 4640 Programming Languages for Web Applications

JavaScript CS 4640 Programming Languages for Web Applications JavaScript CS 4640 Programming Languages for Web Applications 1 How HTML, CSS, and JS Fit Together {css} javascript() Content layer The HTML gives the page structure and adds semantics Presentation

More information

DaMPL. Language Reference Manual. Henrique Grando

DaMPL. Language Reference Manual. Henrique Grando DaMPL Language Reference Manual Bernardo Abreu Felipe Rocha Henrique Grando Hugo Sousa bd2440 flt2107 hp2409 ha2398 Contents 1. Getting Started... 4 2. Syntax Notations... 4 3. Lexical Conventions... 4

More information

Maciej Sobieraj. Lecture 1

Maciej Sobieraj. Lecture 1 Maciej Sobieraj Lecture 1 Outline 1. Introduction to computer programming 2. Advanced flow control and data aggregates Your first program First we need to define our expectations for the program. They

More information

HTML/CSS Lesson Plans

HTML/CSS Lesson Plans HTML/CSS Lesson Plans Course Outline 8 lessons x 1 hour Class size: 15-25 students Age: 10-12 years Requirements Computer for each student (or pair) and a classroom projector Pencil and paper Internet

More information

Week - 01 Lecture - 04 Downloading and installing Python

Week - 01 Lecture - 04 Downloading and installing Python Programming, Data Structures and Algorithms in Python Prof. Madhavan Mukund Department of Computer Science and Engineering Indian Institute of Technology, Madras Week - 01 Lecture - 04 Downloading and

More information

PHP for PL/SQL Developers. Lewis Cunningham JP Morgan Chase

PHP for PL/SQL Developers. Lewis Cunningham JP Morgan Chase PHP for PL/SQL Developers Lewis Cunningham JP Morgan Chase 1 What is PHP? PHP is a HTML pre-processor PHP allows you to generate HTML dynamically PHP is a scripting language usable on the web, the server

More information

Computer Components. Software{ User Programs. Operating System. Hardware

Computer Components. Software{ User Programs. Operating System. Hardware Computer Components Software{ User Programs Operating System Hardware What are Programs? Programs provide instructions for computers Similar to giving directions to a person who is trying to get from point

More information

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 10: OCT. 6TH INSTRUCTOR: JIAYIN WANG

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 10: OCT. 6TH INSTRUCTOR: JIAYIN WANG CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 10: OCT. 6TH INSTRUCTOR: JIAYIN WANG 1 Notice Assignments Reading Assignment: Chapter 3: Introduction to Parameters and Objects The Class 10 Exercise

More information

Some things to watch out for when using PHP and Javascript when building websites

Some things to watch out for when using PHP and Javascript when building websites Some things to watch out for when using PHP and Javascript when building websites Les Hatton 10 Sep 2003 1 PHP PHP is a C-like language which evolved from Perl scripts originally produced by Rasmus Lerdorf

More information