PHP. M hiwa ahamad aziz Raparin univercity. 1 Web Design: Lecturer ( m hiwa ahmad aziz)

Size: px
Start display at page:

Download "PHP. M hiwa ahamad aziz Raparin univercity. 1 Web Design: Lecturer ( m hiwa ahmad aziz)"

Transcription

1 PHP M hiwa ahamad aziz Raparin univercity 1

2 Server-Side Programming language asp, asp.net, php, jsp, perl, cgi... 2 Of 68

3 Client-Side Scripting versus Server-Side Scripting Client-side scripts Validate user input Reduce requests needed to be passed to server Access browser Server-side scripts Executed on server Generate custom response for clients Wide range of programmatic capabilities Access to server-side software that extends server functionality like DBMS 3 Of 68

4 Hosting a website : Self hosting Install a web server on a computer Local access Using domain <localhost> or IP address Necessary for server-side programming development Global access Register a human-readable domain name Obtain IP address 4 Of 68 4

5 Web server architecture LAMP: Most popular fully open source Linux for operating system Apache for web server MySQL for database PHP for server-side scripting Others: WAMP, XAMP: Uses Windows for operating system, with Apache, MySQL, and PHP WISA: Full Microsoft package Windows Internet Information Server (IIS) SQL Server (enterprise) or Access (small-scale) ASP or ASP.NET 5 Of 68 5

6 All-in-one Apache/MySQL/PHP packages EasyPHP (recommended) Includes PHPMyAdmin for administering MySQL database AbriaSoft Merlin Desktop Edition Includes PHPMyAdmin WAMP Server PHP Triad 6 Of 68 6

7 Requesting XHTML or PHP documents Request PHP documents from Apache Save PHP documents in the www folder for WAMP Save PHP documents in the htdocs folder for XAMP Launch web browser Enter PHP document s location in Address field, starting with or 7 Of 68 7

8 What is PHP? PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language PHP scripts are executed on the server 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 8 Of 68 زبانهای برنامه سازی وب

9 What is a PHP File? PHP files can contain text, HTML tags and scripts PHP files are returned to the browser as plain HTML PHP files have a file extension of ".php", ".php3" 9 Of 68 زبانهای برنامه سازی وب

10 Why PHP? Structurally similar to C/C++ Supports procedural and object-oriented paradigm (to some degree) All PHP statements end with a semi-colon Each PHP script must be enclosed in the reserved PHP tag <?php?> <html> <body> <?php echo "Hello World";?> </body> </html> 10 Of 68 Web Design: Lecturer سازی وب ( m hiwa برنامه ahmad ( azizزبانهای

11 Comments in PHP Use // to make a single-line comment or /* and */ to make a large comment block. <html> <body> <? php //This is a comment /* This is a comment block */?> </body> </html> 11 Of 68

12 PHP Variables PHP variables must begin with a $ sign and then a letter or an underscore "_" Example variables name: $x, $_temp, Case-sensitive ($Foo!= $foo!= $foo) In PHP, a variable does not need to be declared before adding a value to it. <?php $foo = 25; $bar = Hello ; // Numerical variable // String variable $foo = ($foo * 7); // Multiplies foo by 7 $bar = ($bar * 7); // Invalid expression?> 12 Of 68

13 Echo The PHP command echo is used to output the parameters passed to it The typical usage for this is to send data to the client s web-browser Syntax void echo (string arg1 [, string argn...]) <?php $foo = 25; // Numerical variable $bar = Hello ; // String variable echo $bar; // Outputs Hello echo $foo,$bar; // Outputs 25Hello echo 5x5=,$foo; // Outputs 5x5=25 echo 5x5=$foo ; // Outputs 5x5=25 echo 5x5=$foo ; // Outputs 5x5=$foo?> 13 Of 68

14 String Variables A string variable is used to store and manipulate text. <?php $txt="hello World"; echo $txt;?> Hello World The concatenation operator (.) is used to put two string values together. <?php $txt1="hello World!"; $txt2="what a nice day!"; echo $txt1. " ". $txt2;?> Hello World! What a nice day! 14 Of 68

15 Arithmetic Operators Operator Description Example Result + Addition $x=$y+2 $x=7 $y=5 - Subtraction $x=$y-2 $x=3 $y=5 * Multiplication $x=$y*2 $x=10 $y=5 / Division $x=$y/2 $x=2.5 $y=5 % Modulus $x=$y%2 $x=1 $y=5 ++ Increment $x=++$y $x=6 $y=6 $x=$y++ $x=5 $y=6 -- Decrement $x=--$y $x=4 $y=4 $x=$y-- $x=5 $y=4 15 Of 68

16 Assignment Operators Operator Example Same As = $x=$y += $x+=$y $x=$x+$y -= $x-=$y $x=$x-$y *= $x*=$y $x=$x*$y.= $x.=$y $x=$x.$y /= $x/=$y $x=$x/$y %= $x%=$y $x=$x%$y 16 Of 68

17 Comparison Operators Given that $x=5, the table below explains the comparison operators: Operator Description Example == is equal to $x==8 is false $x==5 is true!= is not equal $x!=8 is true > is greater than $x>8 is false < is less than $x<8 is true >= is greater than or equal to $x>=8 is false <= is less than or equal to $x<=8 is true 17 Of 68

18 Logical Operators Logical operators are used to determine the logic between variables or values. Given that $x=6 and $y=3, the table below explains the logical operators: Operator Description Example && and ($x < 10 && $y > 1) is true or ($x==5 $y==5) is false! not!($x==$y) is true 18 Of 68

19 Conditional Statements If...else Statement if (condition) { code to be executed if condition is true } else { code to be executed if condition is not true } 19 Of 68

20 Conditional Statements The Switch Statement switch(n) { case 1: execute code block 1 break; case 2: execute code block 2 break; default: code to be executed if n is different from case 1 and 2 } 20 Of 68

21 Arrays Numeric Arrays A numeric array stores each array element with a numeric index. 1. the index are automatically assigned (the index starts at 0) $cars=array("saab","volvo","bmw","toyota"); 2. assign the index manually $cars[0]="saab"; $cars[1]="volvo"; $cars[2]="bmw"; $cars[3]="toyota"; 21 Of 68

22 Associative Arrays Arrays An associative array, each ID key is associated with a value. $ages = array("peter"=>32, «ghanon"=>" book", "Joe"=>34); $ages['peter'] = "32"; $ages[ghanon'] = " book"; $ages['joe'] = "34"; Some function for array sort, asort, count, empty, isset, unset, array_merge, 22 Of 68

23 PHP Loops The for Loop The for loop is used when you know in advance how many times the script should run. for (variable=startvalue ; variable<=endvalue ; variable=+increment) { code to be executed } <?php for ($i=1; $i<=5; $i++) { echo "The number is ". $i. "<br />"; }?> 23 Of 68

24 The while loop PHP Loops The while loop loops through a block of code while a specified condition is true. while (variable<=endvalue) { code to be executed } <?php $i=1; while($i<=5) { echo "The number is ". $i. "<br />"; $i++; }?> 24 Of 68

25 PHP Loops The do...while Loop do { code to be executed } while (variable<=endvalue); <?php $i=1; do { $i++; echo "The number is ". $i. "<br />"; } while ($i<=5);?> 25 Of 68

26 PHP Functions The real power of PHP comes from its functions.in PHP, there are more than 700 built-in functions. Create a PHP Function function functionname() { code to be executed; } <?php function writename() { echo "Kai Jim Refsnes"; } echo "My name is "; writename();?> 26 Of 68

27 Return values PHP Functions <?php function add($x,$y) { $total=$x+$y; return $total; } echo " = ". add(1,16);?> 27 Of 68

28 User Input and Sending Information For using the information and storing them to database requires that transform information between web pages. The PHP $_GET and $_POST variables are used to retrieve information from forms and transform information. 28 Of 68

29 Sending Information-Get method The predefined $_GET variable is used to collect values in a form with method="get". Information sent from a form with the GET method displayed in the browser's address bar has limits on the amount of information to send(exceeding 2000 characters). It is possible to bookmark the page. This can be useful in some cases. 29 Of 68 زبانهای برنامه سازی وب

30 Sending Information-Get method <a href= > link to welcome</a> <form action="welcome.php" method= get"> Name: <input type="text" name="fname" /> Age: <input type="text" name="age" /> <input type="submit" /> </form> welcome.php : <body> Welcome <?php echo $_GET["fname"];?>!<br /> You are <?php echo $_GET["age"];?> years old. </body> 30 Of 68 زبانهای برنامه سازی وب

31 Sending Information-Post method The predefined $_POST variable is used to collect values from a form sent with method="post". Information sent is invisible to others has no limits on the amount of information to send. However, there is an 8 Mb max size for the POST method, by default(can be changed by setting the post_max_size in the php.ini file). 31 Of 68

32 Sending Information-Post method <form action="welcome.php" method= post"> Name: <input type="text" name="fname" /> Age: <input type="text" name="age" /> <input type="submit" /> </form> welcome.php : <body> Welcome <?php echo $_POST["fname"];?>!<br /> You are <?php echo $_POST["age"];?> years old. </body> 32 Of 68

33 Date() Function The PHP date() function is used to format a time and/or date. date(format,timestamp) format: Specifies the format of the timestamp (Required) d - Represents the day of the month (01 to 31) m - Represents a month (01 to 12) Y - Represents a year (in four digits) Timestamp: Specifies a timestamp. Default is the current date and time (Optional) <?php echo date("y/m/d"). "<br />"; echo date("y.m.d"). "<br />"; echo date("y-m-d");?> 2009/05/ Of 68

34 include() Function takes all the content in a specified file and includes it in the current file. <html> <body> <?php include("header.php");?> <h1>welcome to my home page!</h1> <p>some text.</p> </body> </html> 34 Of 68

35 Sending s PHP allows you to send s directly from a script. The PHP mail() Function mail(to,subject,message,headers) Parameter to subject message headers Description Required. Specifies the receiver / receivers of the Required. Specifies the subject of the . Required. Defines the message to be sent. Each line should be separated with a LF (\n). Lines should not exceed 70 characters Optional. Specifies additional headers, like From, Cc, and Bcc. The additional headers should be separated with a CRLF (\r\n) 35 Of 68 زبانهای برنامه سازی وب

36 Sending s PHP Simple <?php $to = "someone@example.com"; $subject = "Test mail"; $message = "Hello! This is a simple message."; $from = "someonelse@example.com"; $headers = "From:". $from; mail($to,$subject,$message,$headers); echo "Mail Sent.";?> 36 Of 68

37 Global Variables - Superglobals Several predefined variables in PHP are "superglobals", which means that they are always accessible, regardless of scope - and you can access them from any function, class or file without having to do anything special. The PHP superglobals variables are: $GLOBALS $_SERVER $_REQUEST $_POST $_GET $_FILES $_ENV $_COOKIE $_SESSION 37 Of 68

38 $GLOBALS $GLOBALS is a PHP super global variable which is used to access global variables from anywhere in the PHP script (also from within functions or methods). PHP stores all global variables in an array called $GLOBALS[index]. The index holds the name of the variable. <?php $x = 75; $y = 25; function addition() { $GLOBALS['z'] = $GLOBALS['x'] + $GLOBALS['y']; } addition(); echo $z;?> 38 Of 68

39 $_SERVER $_SERVER is a PHP super global variable which holds information about headers, paths, and script locations. <?php echo $_SERVER['PHP_SELF']; // Returns the filename of the currently executing script echo "<br>"; echo $_SERVER['SERVER_NAME']; // Returns the name of the host server (such as rapariweb.com) echo "<br>"; echo $_SERVER['SERVER_ADDR']; // Returns the IP address of the host server echo "<br>"; echo $_SERVER['REMOTE_ADDR']; // Returns the IP address from where the user is viewing the current page echo "<br>"; echo $_SERVER['SCRIPT_NAME']; // Returns the path of the current script echo "<br>"; echo $_SERVER['REQUEST_METHOD']; // Returns the request method used to access the page (such as POST)?> 39 Of 68

40 $_REQUEST PHP $_REQUEST is used to collect data after submitting an HTML form. <body> <form method="post" action= #"> Name: <input type="text" name="fname"> <input type="submit"> </form> <?php if ($_SERVER["REQUEST_METHOD"] == "POST") { // collect value of input field $name = $_REQUEST['fname']; if (empty($name)) { echo "Name is empty"; } else { echo $name; } }?> </body> 40 Of 68

41 $_Sessions A PHP session variable is used to store information about, or change settings for a user session. Session variables hold information about one single user, store them on the server temporary and are available to all pages in one application. Sessions work by creating a unique id (UID) for each visitor and store variables based on this UID. 41 Of 68

42 Sessions Starting a PHP Session <?php session_start();?> <html> <body> </body> </html> The code above will register the user's session with the server, allow you to start saving user information, and assign a UID for that user's session. Note: The session_start() function must appear BEFORE the <html> tag: 42 Of 68

43 Sessions Storing a Session Variable The correct way to store and retrieve session variables is to use the PHP $_SESSION variable: <?php session_start(); // store session data $_SESSION['views']=1;?> <html> <body> <?php //retrieve session data echo "Pageviews=". $_SESSION['views'];?> </body> </html> 43 Of 68

44 Sessions A simple page-views counter. The isset() function checks if the "views" variable has already been set. <?php session_start(); if(isset($_session['views'])) $_SESSION['views']=$_SESSION['views']+1; else $_SESSION['views']=1; echo "Views=". $_SESSION['views'];?> 44 Of 68

45 Sessions Destroying a Session The unset() function is used to free the specified session variable: <?php unset($_session['views']);?> session_destroy() function completely destroy the session: <?php session_destroy();?> 45 Of 68

46 MySQL 46

47 MySQL MySQL is the most popular open-source database system. The data in MySQL is stored in database objects called tables. A table is a collection of related data entries and it consists of columns and rows. 47 Of 68

48 Database Tables Databases are useful when storing information categorically. A company may have a database with the following tables: "Employees", "Products", "Customers" and "Orders". A database most often contains one or more tables. Each table is identified by a name (e.g. "Customers" or "Orders"). Tables contain records (rows) with data. 48 Of 68

49 Database Tables Below is an example of a table called "Persons": 49 Of 68

50 Queries A query is a question or a request from database SELECT LastName FROM Persons 50 Of 68

51 PHPMyAdmin PHPMyAdmin is used for creating and administering MySQL database 51 Of 68

52 Creating Database sample 52 Of 68

53 Creating Table in Database 53 Of 68

54 Type 54 Of 68

55 Length/Values 55 Of 68

56 Table structure Perform SQL statement Delete Table Empty Table 56 Of 68

57 Inserting data into table 57 Of 68

58 Table Browse 58 Of 68

59 Importing Database Browse for file Start record from which row Choose format 59 Of 68

60 MySQL - Connect to a Database Before access data in a database, must create a connection to the database. mysql_connect(servername,username,password); Parameter servername username password Description Optional. Specifies the server to connect to. Default value is "localhost:3306" Optional. Specifies the username to log in with. Default value is the name of the user that owns the server process( root ) Optional. Specifies the password to log in with. Default is "" 60 Of 68

61 MySQL - Connect to a Database Closing a Connection : mysql_close() function <?php $con = mysql_connect("localhost", "root", ""); if (!$con) { die('could not connect ); } // some code mysql_close($con);?> 61 Of 68

62 Query Executation Select a database mysql_select_db( databasename", connection name); mysql_select_db("my_db", $con); Execute query mysql_query("command sql ) mysql_query( select fname from person ); 62 Of 68

63 SQL-Insert Into The INSERT INTO statement is used to insert new records in a table. It is possible to write the INSERT INTO statement in two forms. INSERT INTO table_name VALUES (value1, value2, value3,...) INSERT INTO table_name (column1, column2, column3,...) VALUES (value1, value2, value3,...) 63 Of 68

64 SQL-Insert Into <?php $con = mysql_connect("localhost", root", "); if (!$con) { die('could not connect: ); } mysql_select_db("my_db", $con); mysql_query("insert INTO Persons (FirstName, LastName, Age) VALUES ('Peter', 'Griffin', '35')"); mysql_query("insert INTO Persons (FirstName, LastName, Age) VALUES ('Glenn', 'Quagmire', '33')"); mysql_close($con);?> 64 Of 68

65 SQL- Select The SELECT statement is used to select data from a database. SELECT column_name1, column_name2,, column_name_k FROM table_name where condition Condition is Comparison statement involves Comparison Operators like: =, >, >=, <, <=, <> 65 Of 68 v

66 SQL- Select mysql_fetch_array() function return the first row from the recordset as an array. Each call to mysql_fetch_array() returns the next row in the recordset. <?php $con = mysql_connect("localhost","peter","abc123"); mysql_select_db("my_db", $con); $result = mysql_query("select * FROM Persons"); while($row = mysql_fetch_array($result)) { echo $row['firstname']. " ". $row['lastname']; echo "<br />"; } mysql_close($con);?> 66 Of 68

67 SQL- Select Display the Result in an HTML Table 67 Of 68 <?php $con = mysql_connect("localhost","peter","abc123"); mysql_select_db("my_db", $con); $result = mysql_query("select * FROM Persons"); echo "<table border='1'> <tr> <th>firstname</th> <th>lastname</th> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>". $row['firstname']. "</td>"; echo "<td>". $row['lastname']. "</td>"; echo "</tr>"; } echo "</table>";?>

68 SQL- Update The UPDATE statement is used to modify data in a table. UPDATE table_name SET column1=value, column2=value2,... WHERE some_column=some_value <?php $con = mysql_connect("localhost","peter","abc123"); mysql_select_db("my_db", $con); mysql_query("update Persons SET Age = '36' WHERE FirstName = 'Peter' AND LastName = 'Griffin'"); mysql_close($con);?> 68 Of 68

69 SQL- Delete The DELETE statement is used to delete records in a table. DELETE FROM table_name WHERE condition <?php $con = mysql_connect("localhost","peter","abc123"); mysql_select_db("my_db", $con); mysql_query("delete FROM Persons WHERE LastName='Griffin'"); mysql_close($con);?> 69 Of 68

70 For more information Of 68

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

PHP with data handling

PHP with data handling 171 Lesson 18 PHP with data handling Aim Objectives : To provide an introduction data handling with PHP : To give an idea about, What type of data you need to handle? How PHP handle the form data? 18.1

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

What is MySQL? [Document provides the fundamental operations of PHP-MySQL connectivity]

What is MySQL? [Document provides the fundamental operations of PHP-MySQL connectivity] What is MySQL? [Document provides the fundamental operations of PHP-MySQL connectivity] MySQL is a database. A database defines a structure for storing information. In a database, there are tables. Just

More information

PHP Development - Introduction

PHP Development - Introduction PHP Development - Introduction Php Hypertext Processor PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are executed on the server PHP supports many

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

php Mr. Amit Patel Hypertext Preprocessor Dept. of I.T.

php Mr. Amit Patel Hypertext Preprocessor Dept. of I.T. php Hypertext Preprocessor Mr. Amit Patel Dept. of I.T..com.com PHP files can contain text, HTML, JavaScript code, and PHP code PHP code are executed on the server, and the result is returned to the browser

More information

You can also set the expiration time of the cookie in another way. It may be easier than using seconds.

You can also set the expiration time of the cookie in another way. It may be easier than using seconds. What is a Cookie? A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will

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 3 Objectives Creating a new MySQL Database using Create & Check connection with Database

More information

Server Side development with PHP. MICC / University of Florence Daniele Pezza8ni

Server Side development with PHP. MICC / University of Florence Daniele Pezza8ni Server Side development with PHP MICC / University of Florence Daniele Pezza8ni Outline 1. Introduc8on 2. PHP installa8on 3. Variables, Loops and Func8ons 4. Passing data through pages: GET and POST method

More information

PHP combined with MySQL are cross platform (means that you can develop in Windows and serve on a Unix platform)

PHP combined with MySQL are cross platform (means that you can develop in Windows and serve on a Unix platform) What is PHP? PHP stands for PHP: Hypertext Preprocessor PHP is a server side scripting language, like ASP PHP scripts are executed on the server PHP supports many databases (MySQL, Informix, Oracle, Sybase,

More information

Chapter 6 Part2: Manipulating MySQL Databases with PHP

Chapter 6 Part2: Manipulating MySQL Databases with PHP IT215 Web Programming 1 Chapter 6 Part2: Manipulating MySQL Databases with PHP Jakkrit TeCho, Ph.D. Business Information Technology (BIT), Maejo University Phrae Campus Objectives In this chapter, you

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

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

PHP 5 if...else...elseif Statements

PHP 5 if...else...elseif Statements PHP 5 if...else...elseif Statements Conditional statements are used to perform different actions based on different conditions. PHP Conditional Statements Very often when you write code, you want to perform

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

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

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

Course Topics. The Three-Tier Architecture. Example 1: Airline reservations. IT360: Applied Database Systems. Introduction to PHP

Course Topics. The Three-Tier Architecture. Example 1: Airline reservations. IT360: Applied Database Systems. Introduction to PHP Course Topics IT360: Applied Database Systems Introduction to PHP Database design Relational model SQL Normalization PHP MySQL Database administration Transaction Processing Data Storage and Indexing The

More information

More loops. Control structures / flow control. while loops. Loops / Iteration / doing things over and over and over and over...

More loops. Control structures / flow control. while loops. Loops / Iteration / doing things over and over and over and over... Control structures / flow control More loops while loops if... else Switch for loops while... do.. do... while... Much of this material is explained in PHP programming 2nd Ed. Chap 2 Control structures

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

PHP: Cookies, Sessions, Databases. CS174. Chris Pollett. Sep 24, 2008.

PHP: Cookies, Sessions, Databases. CS174. Chris Pollett. Sep 24, 2008. PHP: Cookies, Sessions, Databases. CS174. Chris Pollett. Sep 24, 2008. Outline. How cookies work. Cookies in PHP. Sessions. Databases. Cookies. Sometimes it is useful to remember a client when it comes

More information

PHP INTERVIEW QUESTION-ANSWERS

PHP INTERVIEW QUESTION-ANSWERS 1. What is PHP? PHP (recursive acronym for PHP: Hypertext Preprocessor) is the most widely used open source scripting language, majorly used for web-development and application development and can be embedded

More information

INTERNET PROGRAMMING. Software Engineering Branch / 4 th Class Computer Engineering Department University of Technology

INTERNET PROGRAMMING. Software Engineering Branch / 4 th Class Computer Engineering Department University of Technology INTERNET PROGRAMMING Software Engineering Branch / 4 th Class Computer Engineering Department University of Technology OUTLINES PHP Basic 2 ARCHITECTURE OF INTERNET database mysql server-side programming

More information

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

Web Application Development (WAD) V th Sem BBAITM (Unit 4) By: Binit Patel Web Application Development (WAD) V th Sem BBAITM (Unit 4) By: Binit Patel Working with Forms: A very popular way to make a web site interactive is using HTML based forms by the site. Using HTML forms,

More information

What is Java Script? Writing to The HTML Document. What Can JavaScript do? CMPT 165: Java Script

What is Java Script? Writing to The HTML Document. What Can JavaScript do? CMPT 165: Java Script What is Java Script? CMPT 165: Java Script Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University November 7, 2011 JavaScript was designed to add interactivity to HTML pages

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

SQL stands for Structured Query Language. SQL lets you access and manipulate databases

SQL stands for Structured Query Language. SQL lets you access and manipulate databases CMPSC 117: WEB DEVELOPMENT SQL stands for Structured Query Language SQL lets you access and manipulate databases SQL is an ANSI (American National Standards Institute) standard 1 SQL can execute queries

More information

By the end of this section of the practical, the students should be able to:

By the end of this section of the practical, the students should be able to: By the end of this section of the practical, the students should be able to: Connecting to a MySQL database in PHP with the mysql_connect() and mysql_select_db() functions Trapping and displaying database

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

A QUICK GUIDE TO PROGRAMMING FOR THE WEB. ssh (then type your UBIT password when prompted)

A QUICK GUIDE TO PROGRAMMING FOR THE WEB. ssh (then type your UBIT password when prompted) A QUICK GUIDE TO PROGRAMMING FOR THE WEB TO GET ACCESS TO THE SERVER: ssh Secure- Shell. A command- line program that allows you to log in to a server and access your files there as you would on your own

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

Introductory workshop on PHP-MySQL

Introductory workshop on PHP-MySQL Introductory workshop on PHP-MySQL Welcome to Global Certifications and Training from Rocky Sir Download all needed s/w from monster.suven.net Full Stack development : UI + Server Side 1 or more client

More information

Form Processing in PHP

Form Processing in PHP Form Processing in PHP Forms Forms are special components which allow your site visitors to supply various information on the HTML page. We have previously talked about creating HTML forms. Forms typically

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

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

PHP. Introduction. PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are executed on the server 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

More information

PHP. How Web Applications interact with server side databases CRUD. Connecting and using mysql from PHP PHP provides many mysql specific functions

PHP. How Web Applications interact with server side databases CRUD. Connecting and using mysql from PHP PHP provides many mysql specific functions PHP How Web Applications interact with server side databases CRUD Connecting and using mysql from PHP PHP provides many mysql specific functions mysql_connect mysql_select_db mysql_query mysql_fetch_array

More information

PHP. MIT 6.470, IAP 2010 Yafim Landa

PHP. MIT 6.470, IAP 2010 Yafim Landa PHP MIT 6.470, IAP 2010 Yafim Landa (landa@mit.edu) LAMP We ll use Linux, Apache, MySQL, and PHP for this course There are alternatives Windows with IIS and ASP Java with Tomcat Other database systems

More information

Create Basic Databases and Integrate with a Website Lesson 3

Create Basic Databases and Integrate with a Website Lesson 3 Create Basic Databases and Integrate with a Website Lesson 3 Combining PHP and MySQL This lesson presumes you have covered the basics of PHP as well as working with MySQL. Now you re ready to make the

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

You can use Dreamweaver to build master and detail Web pages, which

You can use Dreamweaver to build master and detail Web pages, which Chapter 1: Building Master and Detail Pages In This Chapter Developing master and detail pages at the same time Building your master and detail pages separately Putting together master and detail pages

More information

User authentication, passwords

User authentication, passwords User authentication, passwords User Authentication Nowadays most internet applications are available only for registered (paying) users How do we restrict access to our website only to privileged users?

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

Database Connectivity using PHP Some Points to Remember:

Database Connectivity using PHP Some Points to Remember: Database Connectivity using PHP Some Points to Remember: 1. PHP has a boolean datatype which can have 2 values: true or false. However, in PHP, the number 0 (zero) is also considered as equivalent to False.

More information

By the end of this section of the practical, the students should be able to:

By the end of this section of the practical, the students should be able to: By the end of this section of the practical, the students should be able to: Display output with PHP built-in and user defined variables, data types and operators Work with text files in PHP Construct

More information

Databases on the web

Databases on the web Databases on the web The Web Application Stack Network Server You The Web Application Stack Network Server You The Web Application Stack Web Browser Network Server You The Web Application Stack Web Browser

More information

JavaScript s role on the Web

JavaScript s role on the Web Chris Panayiotou JavaScript s role on the Web JavaScript Programming Language Developed by Netscape for use in Navigator Web Browsers Purpose make web pages (documents) more dynamic and interactive Change

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

Book IX. Developing Applications Rapidly

Book IX. Developing Applications Rapidly Book IX Developing Applications Rapidly Contents at a Glance Chapter 1: Building Master and Detail Pages Chapter 2: Creating Search and Results Pages Chapter 3: Building Record Insert Pages Chapter 4:

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

MYSQL DATABASE ACCESS WITH PHP

MYSQL DATABASE ACCESS WITH PHP MYSQL DATABASE ACCESS WITH PHP Fall 2010 CSCI 2910 Server-Side Web Programming Typical web application interaction Database Server 3 tiered architecture Security in this interaction is critical Web Server

More information

EXPERIMENT- 9. Login.html

EXPERIMENT- 9. Login.html EXPERIMENT- 9 To write a program that takes a name as input and on submit it shows a hello page with name taken from the request. And it shows starting time at the right top corner of the page and provides

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

Simple sets of data can be expressed in a simple table, much like a

Simple sets of data can be expressed in a simple table, much like a Chapter 1: Building Master and Detail Pages In This Chapter Developing master and detail pages at the same time Building your master and detail pages separately Putting together master and detail pages

More information

Development Technologies. Agenda: phpmyadmin 2/20/2016. phpmyadmin MySQLi. Before you can put your data into a table, that table should exist.

Development Technologies. Agenda: phpmyadmin 2/20/2016. phpmyadmin MySQLi. Before you can put your data into a table, that table should exist. CIT 736: Internet and Web Development Technologies Lecture 10 Dr. Lupiana, DM FCIM, Institute of Finance Management Semester 1, 2016 Agenda: phpmyadmin MySQLi phpmyadmin Before you can put your data into

More information

Inf 202 Introduction to Data and Databases (Spring 2010)

Inf 202 Introduction to Data and Databases (Spring 2010) Inf 202 Introduction to Data and Databases (Spring 2010) Jagdish S. Gangolly Informatics CCI SUNY Albany April 22, 2010 Database Processing Applications Standard Database Processing Client/Server Environment

More information

PHP Dynamic Web Pages, Without Knowing Beans

PHP Dynamic Web Pages, Without Knowing Beans PHP Dynamic Web Pages, Without Knowing Beans Kimberly Bobrow Jennery Intelliclass kimberly@bobrow.net kimberly@jennery.com Page Agenda Introduction Basic Syntax General Language Constructs File Handling

More information

Database Systems Fundamentals

Database Systems Fundamentals Database Systems Fundamentals Using PHP Language Arman Malekzade Amirkabir University of Technology (Tehran Polytechnic) Notice: The class is held under the supervision of Dr.Shiri github.com/arman-malekzade

More information

Course Topics. IT360: Applied Database Systems. Introduction to PHP

Course Topics. IT360: Applied Database Systems. Introduction to PHP IT360: Applied Database Systems Introduction to PHP Chapter 1 and Chapter 6 in "PHP and MySQL Web Development" Course Topics Relational model SQL Database design Normalization PHP MySQL Database administration

More information

IELM 511 Information Systems Design Labs 5 and 6. DB creation and Population

IELM 511 Information Systems Design Labs 5 and 6. DB creation and Population IELM 511 Information Systems Design Labs 5 and 6. DB creation and Population In this lab, your objective is to learn the basics of creating and managing a DB system. One way to interact with the DBMS (MySQL)

More information

Web Programming. Dr Walid M. Aly. Lecture 10 PHP. lec10. Web Programming CS433/CS614 22:32. Dr Walid M. Aly

Web Programming. Dr Walid M. Aly. Lecture 10 PHP. lec10. Web Programming CS433/CS614 22:32. Dr Walid M. Aly Web Programming Lecture 10 PHP 1 Purpose of Server-Side Scripting database access Web page can serve as front-end to a database Ømake requests from browser, Øpassed on to Web server, Øcalls a program to

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

A Primer in Web Application Development

A Primer in Web Application Development A Primer in Web Application Development The purpose of this primer is to provide you with some concept of how web applications work. You will look at some database information, some application development

More information

PIC 40A. Lecture 19: PHP Form handling, session variables and regular expressions. Copyright 2011 Jukka Virtanen UCLA 1 05/25/12

PIC 40A. Lecture 19: PHP Form handling, session variables and regular expressions. Copyright 2011 Jukka Virtanen UCLA 1 05/25/12 PIC 40A Lecture 19: PHP Form handling, session variables and regular expressions 05/25/12 Copyright 2011 Jukka Virtanen UCLA 1 How does a browser communicate with a program on a server? By submitting an

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

Unit IV- Server Side Technologies (PHP)

Unit IV- Server Side Technologies (PHP) Web Technology Unit IV- Server Side Technologies (PHP) By Prof. B.A.Khivsara Note: The material to prepare this presentation has been taken from internet and are generated only for students reference and

More information

CMPS 401 Survey of Programming Languages

CMPS 401 Survey of Programming Languages CMPS 401 Survey of Programming Languages Programming Assignment #4 PHP Language On the Ubuntu Operating System Write a PHP program (P4.php) and create a HTML (P4.html) page under the Ubuntu operating system.

More information

Open Source Web Application Development - CS310

Open Source Web Application Development - CS310 2018 Open Source Web Application Development - CS310 KASHIF ADEEL bc140401362@vu.edu.pk Introduction PHP PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.

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

Lecture 2 Unix and PHP. INLS 523 Web Databases Spring 2013 Rob Capra

Lecture 2 Unix and PHP. INLS 523 Web Databases Spring 2013 Rob Capra Lecture 2 Unix and PHP INLS 523 Web Databases Spring 2013 Rob Capra Server-Side Scripting Server-side scripting Scripts run on the server Scripts return HTML to the client Apache Open-source Perl and PHP

More information

Guide for Building Web Application Using PHP and Mysql

Guide for Building Web Application Using PHP and Mysql Guide for Building Web Application Using PHP and Mysql 1. Download and install PHP, Web Server, and MySql from one of the following sites. You can look up the lecture notes on the class webpage for tutorials

More information

Introduction to Databases. Key Concepts. Calling a PHP Script 5/17/2012 PHP I

Introduction to Databases. Key Concepts. Calling a PHP Script 5/17/2012 PHP I Introduction to Databases PHP I PHP in HTML Calling functions Form variables Identifies and data types Operators Decisions Conditionals Arrays Multi dimensional arrays Sorting arrays Array manipulation

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

LAMP Apps. Overview. Learning Outcomes: At the completion of the lab you should be able to:

LAMP Apps. Overview. Learning Outcomes: At the completion of the lab you should be able to: LAMP Apps Overview This lab walks you through using Linux, Apache, MySQL and PHP (LAMP) to create simple, yet very powerful PHP applications connected to a MySQL database. For developers using Windows,

More information

B. V. Patel Institute of BMC & IT 2014

B. V. Patel Institute of BMC & IT 2014 Unit 1: Introduction Short Questions: 1. What are the rules for writing PHP code block? 2. Explain comments in your program. What is the purpose of comments in your program. 3. How to declare and use constants

More information

Distributed Databases and Remote Access to a Database

Distributed Databases and Remote Access to a Database Distributed Databases and Remote Access to a Database Table of Contents 1 Distributed Databases... 2 2 Internet (Overview)... 4 3 Internet-Based Applications... 9 3.1 Server-Side Scripting... 9 3.2 Client-Side

More information

PHP Hypertext Preprocessor

PHP Hypertext Preprocessor PHP Hypertext Preprocessor A brief survey Stefano Fontanelli stefano.fontanelli@sssup.it January 16, 2009 Stefano Fontanelli stefano.fontanelli@sssup.it PHP Hypertext Preprocessor January 16, 2009 1 /

More information

Chapter. Accessing MySQL Databases Using PHP

Chapter. Accessing MySQL Databases Using PHP Chapter 12 Accessing MySQL Databases Using PHP 150 Essential PHP fast Introduction In the previous chapter we considered how to create databases using MySQL. While this is useful, it does not enable us

More information

DATABASE SYSTEMS. Introduction to web programming. Database Systems Course, 2016

DATABASE SYSTEMS. Introduction to web programming. Database Systems Course, 2016 DATABASE SYSTEMS Introduction to web programming Database Systems Course, 2016 AGENDA FOR TODAY Client side programming HTML CSS Javascript Server side programming: PHP Installing a local web-server Basic

More information

Autopopulation; Session & Cookies

Autopopulation; Session & Cookies ; Session & Cookies CGT 356 Web Programming, Development, & Database Integration Lecture 5 Session array Use the Session array to store data that needs to be recalled on later pages $_SESSION[ foo ] Use

More information

COMP519: Web Programming Autumn 2015

COMP519: Web Programming Autumn 2015 COMP519: Web Programming Autumn 2015 In the next lectures you will learn What is SQL How to access mysql database How to create a basic mysql database How to use some basic queries How to use PHP and mysql

More information

Lecture 7: Web hacking 3, SQL injection, Xpath injection, Server side template injection, File inclusion

Lecture 7: Web hacking 3, SQL injection, Xpath injection, Server side template injection, File inclusion IN5290 Ethical Hacking Lecture 7: Web hacking 3, SQL injection, Xpath injection, Server side template injection, File inclusion Universitetet i Oslo Laszlo Erdödi Lecture Overview What is SQL injection

More information

COM1004 Web and Internet Technology

COM1004 Web and Internet Technology COM1004 Web and Internet Technology When a user submits a web form, how do we save the information to a database? How do we retrieve that data later? ID NAME EMAIL MESSAGE TIMESTAMP 1 Mike mike@dcs Hi

More information

Introduction. Server-side Techniques. Introduction. 2 modes in the PHP processor:

Introduction. Server-side Techniques. Introduction. 2 modes in the PHP processor: Introduction Server-side Techniques PHP Hypertext Processor A very popular server side language on web Code embedded directly into HTML documents http://hk2.php.net/downloads.php Features Free, open source

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

Introduction to JavaScript

Introduction to JavaScript 127 Lesson 14 Introduction to JavaScript Aim Objectives : To provide an introduction about JavaScript : To give an idea about, What is JavaScript? How to create a simple JavaScript? More about Java Script

More information

Lecture 6 Session Control and User Authentication. INLS 760 Web Databases Spring 2013 Rob Capra

Lecture 6 Session Control and User Authentication. INLS 760 Web Databases Spring 2013 Rob Capra Lecture 6 Session Control and User Authentication INLS 760 Web Databases Spring 2013 Rob Capra HTML Forms and PHP PHP: lect2/form1.php echo "Hello, ". htmlspecialchars(strip_tags($_get['name'])); echo

More information

Sample Copy. Not For Distribution

Sample Copy. Not For Distribution PHP Mysql For Advanced Learning i First published in India with the support of EDUCREATION PUBLISHING RZ 94, Sector - 6, Dwarka, New Delhi - 110075 Shubham Vihar, Mangla, Bilaspur, Chhattisgarh - 495001

More information

DR B.R.AMBEDKAR UNIVERSITY B.Sc.(Computer Science): III Year THEORY PAPER IV (Elective 4) PHP, MySQL and Apache

DR B.R.AMBEDKAR UNIVERSITY B.Sc.(Computer Science): III Year THEORY PAPER IV (Elective 4) PHP, MySQL and Apache DR B.R.AMBEDKAR UNIVERSITY B.Sc.(Computer Science): III Year THEORY PAPER IV (Elective 4) PHP, MySQL and Apache 90 hrs (3 hrs/ week) Unit-1 : Installing and Configuring MySQL, Apache and PHP 20 hrs Installing

More information

Web Development & SEO (Summer Training Program) 4 Weeks/30 Days

Web Development & SEO (Summer Training Program) 4 Weeks/30 Days (Summer Training Program) 4 Weeks/30 Days PRESENTED BY RoboSpecies Technologies Pvt. Ltd. Office: D-66, First Floor, Sector- 07, Noida, UP Contact us: Email: stp@robospecies.com Website: www.robospecies.com

More information

NETB 329 Lecture 13 Python CGI Programming

NETB 329 Lecture 13 Python CGI Programming NETB 329 Lecture 13 Python CGI Programming 1 of 83 What is CGI? The Common Gateway Interface, or CGI, is a set of standards that define how information is exchanged between the web server and a custom

More information

Creating HTML files using Notepad

Creating HTML files using Notepad Reference Materials 3.1 Creating HTML files using Notepad Inside notepad, select the file menu, and then Save As. This will allow you to set the file name, as well as the type of file. Next, select the

More information

Server side scripting and databases

Server side scripting and databases Example table Server side scripting and databases student How Web Applications interact with server side databases - part 2 student kuid lastname money char char int student table Connecting and using

More information

CPSC 481: CREATIVE INQUIRY TO WSBF

CPSC 481: CREATIVE INQUIRY TO WSBF CPSC 481: CREATIVE INQUIRY TO WSBF J. Yates Monteith, Fall 2013 Schedule HTML and CSS PHP HTML Hypertext Markup Language Markup Language. Does not execute any computation. Marks up text. Decorates it.

More information

UNIT V ESTABLISHING A DATABASE CONNECTION AND WORKING WITH DATABASE

UNIT V ESTABLISHING A DATABASE CONNECTION AND WORKING WITH DATABASE UNIT V 1 ESTABLISHING A DATABASE CONNECTION AND WORKING WITH DATABASE SYLLABUS 5.1 Overview of Database 5.2 Introduction to MYSQL 5.3 Creating Database using phpmyadmin & Console(using query, using Wamp

More information

USQ/CSC2406 Web Publishing

USQ/CSC2406 Web Publishing USQ/CSC2406 Web Publishing Lecture 4: HTML Forms, Server & CGI Scripts Tralvex (Rex) Yeap 19 December 2002 Outline Quick Review on Lecture 3 Topic 7: HTML Forms Topic 8: Server & CGI Scripts Class Activity

More information

COMS 469: Interactive Media II

COMS 469: Interactive Media II COMS 469: Interactive Media II Agenda Review Content Management (cont.) Replace all txt files with database tables Expand PHP/MySQL SELECT, UPDATE & DELETE queries Permit full editorial control over content

More information

CITS1231 Web Technologies. PHP s, Cookies and Session Control

CITS1231 Web Technologies. PHP  s, Cookies and Session Control CITS1231 Web Technologies PHP Emails, Cookies and Session Control Sending email with PHP We have looked at storing user information using files. Email messages can also be thought of as data streams, providing

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

4th year. more than 9 years. more than 6 years

4th year. more than 9 years. more than 6 years 4th year more than 9 years more than 6 years Apache (recommended) IIS MySQL (recommended) Oracle Client Webserver www.xyz.de Webpage (Output) Output Call MySQL-Database Dataexchange PHP Hello World

More information