Server-side: PHP and MySQL

Size: px
Start display at page:

Download "Server-side: PHP and MySQL"

Transcription

1 Server-side: PHP and MySQ webserver e.g. Apache ) ) PHP MySQ!" #$$%& ' )& +", -../ -0 &0/ 1 +"1& ' <head><title>hello</title></head> echo "<h1>hello</h1>" ) ; </body> </html> 1 2 '2 & 3& <7= )& ' +:"& & & = 1, 7 > ; A6< =?<@A! B 7= C+" +=<D E = A F 1 PHP: Programming anguage of the Year RU Nijmegen, voorjaar 200 1

2 1 +"1 1 ) 1 <head><title>generation of HTM</title> </head> echo "<h3>generated HTM-code</h3>\n" ; $number = 5 ; $square = $number $number ; echo "<p>if number = $number, ", then its square = $square </p>" ; for $num = 1 ; $num < 10 ; $num++ ) echo "$num " ; <p>the end... </p> ) 1 <head> <title>generation of HTM</title> </head> <h3>generated HTM-code</h3> <p>if number = 5, then its square = 25</p> <p>the end... </p> </body> </html> 1 7 B 'G5&H 6 ' C+"= 1 '1 I 5& 2 include 'prepend.php' ; include $somefile ; include 'somefile.txt' ) ; 8 J1 <!DOCTYPE html PUBIC "-//W3C//DTD XHTM 1.0 Strict//EN" " <head> <title>include files</title> <style><!- - here go the relevant styles..//--> </style></head> <div class="top"> include 'top.inc'; </div> <div class="left"> $somefile = "menu.html" ; include $somefile; </div> <div class="main"> include 'somefile.txt' ); </div> = = > = 5 5&K & 10 5 echo <h1>hello</h1> ) ; <=secure / ) ' <? echo <h1>hello</h1> ) ; <script language="php"> echo <h1>hello</h1> ) ; </script> <% echo <h1>hello</h1> ) ; %> reliant upon server configuration A < ) echo "<h1>php echo-test</h1>" ) ; $firstname = "John" ; $lastname = "Johnson" ; $age = 21 ; $length = 1.87 ; Variable names always start with the dollar sign $, e.g.: $a_variable ; $name = "John" ; $weight1 = 64.5 ; $weight2 = $weight ; $age = 25 ; 4M 6 '? ' & echo $firstname, " ", $lastname ; echo " is " ) ; echo $age ; echo " years old<br>and has length: $length m's."; When writing a web script, use PHP to output HTM tags, too RU Nijmegen, voorjaar 200 2

3 < ).81 N IO8811 // Create a variable $myvariable; // Do things to variables $augend = 3; $addend = 5; $sum = $addend + $augend; $also_sum = $augend; $also_sum += $addend; $zero = 0; $one = ++$zero; // Variables can be anything! $integer = 52; $floatvalue = ; $stringvalue = 'Hello World'; $string2value = "Hello again"; $boolvalue = true; D D '= P ' & function putheader $title ) { echo <<< HEADER <head> <title> $title </title> </head> HEADER ; ; function makeh1 $chaptitle ) { echo "<h1> $chaptitle </h1>"; ; function multiply $a, $b ) { return $a $b; ; // Function calls: putheader "PHP functions" ); makeh1 "Chapter 1" ); echo "12723 = ", multiply 127, 23 ); 13 <p>that's all...</p> 14 A ) '''&'& A -/..>./.-. Q...>.. & A & // Example control statements if $meal == 'Steak' ) echo 'Yum!'; echo 'Blugh!'; switch $beverage ) { case 'wine': $BAC = 0.03; break; case 'jungle juice': $BAC = 0.23; echo 'Death!'; break; for $i = 1 ; $i < 5 ; $i++ ) echo $i ; // Special comparison example if 1 === true ) echo 'Big problems.'; 15 A? 1: = $$O < 1: <head><title>php and strings </title></head> // A Simple String echo 'I am a simple string!'; // Concatenation echo 'A'. ' meets '. 'B'; // Concatenation and assignment $string1 = 'dog'; $string2 = "fleas"; $uglydog = $string1. $string2; echo "<br />", $string1, " ", $uglydog; // Outputting with tags and // Interpolating variables echo '<p> My dog is cute. </p>'; echo 'I said $string1'; echo "I said $string1"; echo "I have two {$string1s"; 16 ) Q ) ' R E1 & Numeric Associative Index Value Key Value First Name Hootie 1 Fish swim good. ast Name Blowfish 2 [SimpleXM Object] Species Salmon J <head><title>array Demo</title></head> <h1>array Demo</h1> <p> $capitals = array 'France'=>'Paris', 'Ireland'=>'Dublin', 'Netherlands'=>'Amsterdam', 'Belgium'=>'Brussels'); echo 'The capital of France is '; echo $capitals['france'], ".<br />"; echo "The various capitals are:<ul>"; foreach $capitals as $city) { echo "<li>$city</li>"; ; echo "</ul>" </p> 18 RU Nijmegen, voorjaar 200 3

4 ) & A & & 5! ) <head><title>php Arrays</title> </head> // Using Arrays $meals = array 'Steak', 'Shark', 'Cat' ) ; $steak_meal = $meals[0]; $judges = array 'Steak' => 'Good', 'Shark' => 'Dry', 'Cat' => 'Dry & Bony' ) ; // The foreach loop foreach $meals as $food ) echo "I want $food. <br />"; echo "<br />" ; foreach $judges as $food => $rev ) echo "$food is $rev <br />"; 1 )& & <head><title>more PHP arrays</title></head> / foreach example 1: value only / $arr = array 1, 2, 3, 17); echo "Content of array \$arr: " ; foreach $arr as $value ) echo "$value "; echo "<br />"; / foreach example 2: value with index printed for illustration) / $arr = array 1, 2, 3, 17); $index = 0; / for illustrative purposes only / foreach $arr as $value ) { echo "\$arr[$index] => $value.<br />"; $index++; / foreach example 3: key and value / $arr = array "one" => 1, "two" => 2, "three" => 3, "seventeen" => 17 ); foreach $arr as $key => $value ) echo "\$arr[$key] => $value.<br />"; Attention for the use of the escape symbol \ There are two syntaxes: foreach array_expression as $value ) statement ; 20 foreach array_expression as $key => $value ) statement ; 1, D1 ST?K STBJ1 1, 1 5 G+:"1H 5 <head><title>http Request</title></head> <h3>request Form</h3> <form method="post" action=" Full name:<br /> <input type="text" name="fullname" size="15"> <br />City: </b><br /> <input type="text" name="city" size="15"> <br />Your order:<br /> <textarea name="ordered" cols="15" rows="3"></textarea> <p><input type="submit" value="submit"> <input type="reset" value="reset"></p> </form> , D1, & <head><title>request Answer</title></head> <h1>confirmation</h1> We received your request: <table border="1"><tr> <td>full name:</td> $fullname = $_POST['fullname']; echo "<td>$fullname </td>"; </tr><tr> <td>city:</td> $city = $_POST['city']; echo "<td> $city </td>"; </tr></table> <p>you ordered:<br /> $ordered = $_POST['ordered']; echo $ordered; </p> ST?1? ' A +:"& A +:" A I D :"1, 1 < +:" mysql_connect...,...,...) mysql_select_db...) mysql_query $query ) e.g. rows/fields/array... mysql_close ) 24 RU Nijmegen, voorjaar 200 4

5 Contact with which database system? +:" 1 :"+:" 1!<@+& :" = 4 M' 4 M // Connect and Select the database mysql_connect localhost, admin, mypassword ); mysql_select_db awesome_db ); // Now let s grab one single name $name = Joel ; $result = mysql_query SEECT age FROM people WHERE name= $name ; ); $age = mysql_fetch_assoc$result); MySQ is free no charge, source available) It has good PHP support Using a different SQ db system should be easy 25 People: Name Age Height Tack 1 64 Joel 1 34 echo $age[ age ]; mysql_close); Possible if only 26 one single value! And more examples // perform the sql-query and return the results: $result = mysql_query "SEECT FROM sample;" ); //show all the data via a while loop: while $row = mysql_fetch_assoc $result ) ) { // using foreach, list all the data that was returned in the $row array // from mysql_fetch_assoc foreach $row as $key => $value ) { echo $key. ' =. $value. '<br />' ; echo '<br />'; 27 Some information from php.net : mysql_fetch_array PHP 4, PHP 5, PEC mysql:1.0) mysql_fetch_array Fetch a result row as an associative array, a numeric array, or both Description : array mysql_fetch_array resource $result [, int $result_type] ) Returns an array that corresponds to the fetched row and moves the internal data pointer ahead. mysql_fetch_assoc PHP 4 >= 4.0.3, PHP 5, PEC mysql:1.0) mysql_fetch_assoc Fetch a result row as an associative array Description : array mysql_fetch_assoc resource $result ) Returns an associative array that corresponds to the fetched row and moves the internal data pointer ahead. mysql_fetch_assoc) is equivalent to calling mysql_fetch_array) with MYSQ_ASSOC for the optional second parameter. It only returns an associative array. mysql_fetch_row PHP 4, PHP 5, PEC mysql:1.0) mysql_fetch_row Fetch a result row as an enumerated array Description : array mysql_fetch_row resource $result ) Returns an array that corresponds to the fetched row and moves the internal data pointer ahead. 28 => Which you use is up to you. All functions are pretty similar. Another mysql_fetch -possibility when using OO-php mysql_fetch_object PHP 4, PHP 5, PEC mysql:1.0) mysql_fetch_object Fetch a result row as an object Description: object mysql_fetch_object resource $result [, string $class_name [, array $params ]] ) Returns an object with properties that correspond to the fetched row and moves the internal data pointer ahead. Parameters result The result resource that is being evaluated. This result comes from a call to mysql_query). class_name The name of the class to instantiate, set the properties of and return. If not specified, a stdclass object is returned. params An optional array of parameters to pass to the constructor for class_name objects. 2 < I+:" $connected = mysql_connect...science.ru.nl", "B3test-admin",... ) ; if!$connected ) echo "System could not connect to MySQ...<br />"; echo "System connected correctly to MySQ...<br />"; $selectdb = mysql_select_db "B3test ) ; if!$selectdb ) echo "Error: could not select the database...<br />"; echo "Database was correctly opened...<br />"; $result = mysql_query "SEECT FROM table_name ; ) ; if!$result ) echo "The query could not be executed...<br />"; echo "The query executed correctly...<br />";!" #$! mysql_close ) ; 30 RU Nijmegen, voorjaar 200 5

6 A= /&M 4&M1 =!<@+' ', $host ="mysql-b3test.science.ru.nl"; $user ="B3test-user"; $password = "63GHrqw2"; $database = "B3test"; $connection = mysql_connect $host, $user, $password ) or die "Couldn't connect to server". mysql_error) ); < I+:" & //... See first part.. $result = mysql_query "SEECT Voornaam, Achternaam, Plaats FROM eden ;"); if!$result ) echo "The query could not be executed...<br />"; echo "The query executed correctly...<br />"; // dealing with the results: determine number of received rows and of fields... $num_rows = mysql_num_rows $result ); $num_fields = mysql_num_fields $result ); echo "Received: num_rows= ", $num_rows, "<br />"; echo "Received: num_fields= ", $num_fields, "<br />"; $db = mysql_select_db $database, $connection ) or die "Couldn't select database". mysql_error) ); $query = ". " ; $result = mysql_query $query ) or die "Couldn't execute query: ". mysql_error)); 31 // transfer first received row data from total $result to a separate 1-row-variable // through: $row = mysql_fetch_array $result ); // or: $row = mysql_fetch_assoc $result ); // get the column headers out of the partly associative) row-array: // through: $keys = array_keys $row ) ; // or: foreach $row as $key => $value ). 32 < I+:" 3& if $num_rows > 0 ) { $firstrow = true; echo "<table border=\"2\">"; while $row = mysql_fetch_assoc $result ) ) { if $firstrow) { echo "<tr>"; foreach $row as $key => $value) echo "<th>$key</th>"; echo "</tr>\n"; $firstrow = false; echo "<tr>"; foreach $row as $key => $value ) echo "<td> $value </td>" ; echo "</tr>" ; echo "</table>" ; First: place the table headers the $key-values) 33 < I+:" 2& $row = mysql_fetch_array $result ); $keys = array_keys $row ) ; echo "<table border=2><br /> <tr>" ; for $index=0 ; $index < $num_fields ; $index++ ) echo "<th>", $keys[ 2 $index + 1 ], "</th>" ; echo "</tr>" ; for $row_num=0; $row_num < $num_rows; $row_num++) { echo "<tr>" ; $values = array_values $row ) ; for $index=0 ; $index < $num_fields ; $index++ ) { $value = htmlspecialchars $values[2$index +1]); echo "<td> $value </td>" ; echo "</tr>" ; // fetch next result row: $row = mysql_fetch_array $result ); echo "</table>" ; A difficult way don t walk this way if not nevessary! Much simpler with the while $row = mysql_fetch_array $result ); ) and foreach $row as $key => $value ) construction with key and value from the last sheet! 34 " 7 '@6 ) A@ 777! 7 ) U1 1, I+:"1, B = < mysql-b3test.science.ru.nl B3test-user 63GHrqw2 B3test 6@2 1 F I II I II,I II FI 35 V 2#& F = Groepsindeling met groupnumber : 1 Koldijk, Saskia + Sappelli, Maya 2 Veltmaat, Maaike + Wijngaarden, Carolien van 3 Dijkstra, ouis + Gerke, Paul K. 4 Neutelings, Jascha + Versteeg, Reinout 5 Haga, Femke + Verdonschot, Taco 6 Barth, Ruud + Wolterink, Jelmer 7 Dijk, Els van + Vroon, Jered 8 Fang, Yuen + Hofman, Jorien Janssen, oth + Petrachi, Daniel 10 Roerdinkholder, Hans <= dus bijv. group5 36 RU Nijmegen, voorjaar 200 6

7 ) U1 1, I+:"1 & =F F 1 # I#R III@2 I 1I 1 = P= =@1 6 1 &=solost.science.ru.nl 5&/vol/www/B3test/web-docs/group n = 1 =& 1& 1 ) ' 1 ' W 1 = 37 ) U1 1, I+:"1 += C+"1' +:"1 V ' XX = F> Zorg ervoor, dat alle gegevens per lid!) in een nette tabel getoond worden. Gebruik webpagina s die naar eigen opmaak -voorkeur via PHP met include -opdrachten en styles; géén frames meer) gegenereerd worden test dingen eerst kaal uit). 38 RU Nijmegen, voorjaar 200 7

Web Programming with PHP 5. The right tool for the right job.

Web Programming with PHP 5. The right tool for the right job. Web Programming with PHP 5 The right tool for the right job. PHP as an Acronym PHP PHP: Hypertext Preprocessor This is called a Recursive Acronym GNU? GNU s Not Unix! CYGNUS? CYGNUS is Your GNU Support

More information

Server-side: PHP and MySQL (continued)

Server-side: PHP and MySQL (continued) Server-side: PHP and MySQL (continued) some remarks check on variable: isset ( $variable )? more functionality in a single form more functionality in a single PHP-file updating the database data validation

More information

Connecting to a Database Using PHP. Prof. Jim Whitehead CMPS 183, Spring 2006 May 15, 2006

Connecting to a Database Using PHP. Prof. Jim Whitehead CMPS 183, Spring 2006 May 15, 2006 Connecting to a Database Using PHP Prof. Jim Whitehead CMPS 183, Spring 2006 May 15, 2006 Rationale Most Web applications: Retrieve information from a database to alter their on-screen display Store user

More information

Server side scripting and databases

Server side scripting and databases Three components used in typical web application Server side scripting and databases How Web Applications interact with server side databases Browser Web server Database server Web server Web server Apache

More information

Download: Server-side technologies. WAMP (Windows), http://www.wampserver.com/en/ MAMP (Mac), http://www.mamp.info/en/

Download: Server-side technologies. WAMP (Windows), http://www.wampserver.com/en/ MAMP (Mac), http://www.mamp.info/en/ + 1 Server-side technologies Apache,, Download: Apache Web Server: http://httpd.apache.org/download.cgi application server: http://www.php.net/downloads.php DBMS: http://www.mysql.com/downloads/ LAMP:

More information

A Brief Introduction to MySQL

A Brief Introduction to MySQL A Brief Introduction to MySQL by Derek Schuurman Introduction to Databases A database is a structured collection of logically related data. One common type of database is the relational database, a term

More information

A table is a collection of related data entries and it consists of columns and rows.

A table is a collection of related data entries and it consists of columns and rows. CST 250 MySQL Notes (Source: www.w3schools.com) MySQL is the most popular open-source database system. What is MySQL? MySQL is a database. The data in MySQL is stored in database objects called tables.

More information

7- PHP and MySQL queries

7- PHP and MySQL queries 7- PHP and MySQL queries Course: Cris*na Puente, Rafael Palacios 2010- 1 Introduc*on Introduc?on PHP includes libraries for communica*ng with several databases: MySQL (OpenSource, the use selected for

More information

Server-side: PHP and MySQL (continued)

Server-side: PHP and MySQL (continued) An observation related to last assignment Server-side: PHP and MySQL (continued)! " I found as result code for last assignment: echo "Transporting Data to a Database...";

More information

Form Handling. Server-side Web Development and Programming. Form Handling. Server Page Model. Form data appended to request string

Form Handling. Server-side Web Development and Programming. Form Handling. Server Page Model. Form data appended to request string Form Handling Server-side Web Development and Programming Lecture 3: Introduction to Java Server Pages Form data appended to request string

More information

Other Language Types CMSC 330: Organization of Programming Languages

Other Language Types CMSC 330: Organization of Programming Languages Other Language Types CMSC 330: Organization of Programming Languages Markup and Query Languages Markup languages Set of annotations to text Query languages Make queries to databases & information systems

More information

Chapter 2: Interactive Web Applications

Chapter 2: Interactive Web Applications Chapter 2: Interactive Web Applications 2.1! Interactivity and Multimedia in the WWW architecture 2.2! Server-Side Scripting (Example PHP, Part I) 2.3! Interactivity and Multimedia for Web Browsers 2.4!

More information

Precondition for a good understanding: knowledge of a higher programming language (e.g. C, Java, Perl, Pascal, Basic,... ) basic knowledge of html

Precondition for a good understanding: knowledge of a higher programming language (e.g. C, Java, Perl, Pascal, Basic,... ) basic knowledge of html Some Remarks about Dynamic Webpages Matthias K. Krause Hochschule für Telekommunikation, Leipzig University of Applied Sciences Deutsche Telekom krause@hft-leipzig.de Precondition for a good understanding:

More information

Web development... the server side (of the force)

Web development... the server side (of the force) Web development... the server side (of the force) Fabien POULARD Document under license Creative Commons Attribution Share Alike 2.5 http://www.creativecommons.org/learnmore Web development... the server

More information

INSTALLING, CONFIGURING, AND DEVELOPING WITH XAMPP

INSTALLING, CONFIGURING, AND DEVELOPING WITH XAMPP INSTALLING, CONFIGURING, AND DEVELOPING WITH XAMPP by Dalibor D. Dvorski, March 2007 Skills Canada Ontario DISCLAIMER: A lot of care has been taken in the accuracy of information provided in this article,

More information

MYSQL DATABASE ACCESS WITH PHP

MYSQL DATABASE ACCESS WITH PHP MYSQL DATABASE ACCESS WITH PHP Fall 2009 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

How to Create a Dynamic Webpage

How to Create a Dynamic Webpage Intro to Dynamic Web Development ACM Webmonkeys @ UIUC, 2010 Static vs Dynamic "Static" is an adjective meaning "does not change". In the context of web programming, it can be used several different ways,

More information

PHP and XML. Brian J. Stafford, Mark McIntyre and Fraser Gallop

PHP and XML. Brian J. Stafford, Mark McIntyre and Fraser Gallop What is PHP? PHP and XML Brian J. Stafford, Mark McIntyre and Fraser Gallop PHP is a server-side tool for creating dynamic web pages. PHP pages consist of both HTML and program logic. One of the advantages

More information

Create dynamic sites with PHP & MySQL

Create dynamic sites with PHP & MySQL Create dynamic sites with PHP & MySQL Presented by developerworks, your source for great tutorials Table of Contents If you're viewing this document online, you can click any of the topics below to link

More information

DIPLOMA IN WEBDEVELOPMENT

DIPLOMA IN WEBDEVELOPMENT DIPLOMA IN WEBDEVELOPMENT Prerequisite skills Basic programming knowledge on C Language or Core Java is must. # Module 1 Basics and introduction to HTML Basic HTML training. Different HTML elements, tags

More information

Web Programming Step by Step

Web Programming Step by Step Web Programming Step by Step Chapter 11 Relational Databases and SQL References: SQL syntax reference, w3schools tutorial Except where otherwise noted, the contents of this presentation are Copyright 2009

More information

Web Application Security Part 1

Web Application Security Part 1 Web Application Security Part 1 Author : Treasure Priyamal Site : www.treasuresec.com E-mail : treasure@treasuresec.com Twitter :http://twitter.com/treasure_sec Introduction Today we are going to talk

More information

Introduction to Server-Side Programming. Charles Liu

Introduction to Server-Side Programming. Charles Liu Introduction to Server-Side Programming Charles Liu Overview 1. Basics of HTTP 2. PHP syntax 3. Server-side programming 4. Connecting to MySQL Request to a Static Site Server: 1. Homepage lookup 2. Send

More information

CPE111 COMPUTER EXPLORATION

CPE111 COMPUTER EXPLORATION CPE111 COMPUTER EXPLORATION BUILDING A WEB SERVER ASSIGNMENT You will create your own web application on your local web server in your newly installed Ubuntu Desktop on Oracle VM VirtualBox. This is a

More information

Facebook Twitter YouTube Google Plus Website Email

Facebook Twitter YouTube Google Plus Website Email PHP MySQL COURSE WITH OOP COURSE COVERS: PHP MySQL OBJECT ORIENTED PROGRAMMING WITH PHP SYLLABUS PHP 1. Writing PHP scripts- Writing PHP scripts, learn about PHP code structure, how to write and execute

More information

Creating a High-Score Table

Creating a High-Score Table Creating a High-Score Table A high-score table is an important element in just about any game where the player is rewarded with points. Not only does it give the player something to strive for, it increases

More information

PHP Tutorial From beginner to master

PHP Tutorial From beginner to master PHP Tutorial From beginner to master PHP is a powerful tool for making dynamic and interactive Web pages. PHP is the widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.

More information

Supercharge your MySQL application performance with Cloud Databases

Supercharge your MySQL application performance with Cloud Databases Supercharge your MySQL application performance with Cloud Databases J.R. Arredondo Director Product Marketing Kelly Goolsby Sales Engineering Manager Daniel Morris Senior Product Manager Dave Fowler Founder

More information

HTML Forms and CONTROLS

HTML Forms and CONTROLS HTML Forms and CONTROLS Web forms also called Fill-out Forms, let a user return information to a web server for some action. The processing of incoming data is handled by a script or program written in

More information

ISI ACADEMY Web applications Programming Diploma using PHP& MySQL

ISI ACADEMY Web applications Programming Diploma using PHP& MySQL ISI ACADEMY for PHP& MySQL web applications Programming ISI ACADEMY Web applications Programming Diploma using PHP& MySQL HTML - CSS - JavaScript PHP - MYSQL What You'll Learn Be able to write, deploy,

More information

Joomla 1.0 Extension Development Training. Learning to program for Joomla

Joomla 1.0 Extension Development Training. Learning to program for Joomla Joomla 1.0 Extension Development Training Learning to program for Joomla Objectives & Requirements Learn to develop basic Joomla Mambots, Modules and Components. Familiar with PHP and MySQL programming.

More information

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence Web Development Owen Sacco ICS2205/ICS2230 Web Intelligence Introduction Client-Side scripting involves using programming technologies to build web pages and applications that are run on the client (i.e.

More information

About ZPanel. About the framework. The purpose of this guide. Page 1. Author: Bobby Allen (ballen@zpanelcp.com) Version: 1.1

About ZPanel. About the framework. The purpose of this guide. Page 1. Author: Bobby Allen (ballen@zpanelcp.com) Version: 1.1 Page 1 Module developers guide for ZPanelX Author: Bobby Allen (ballen@zpanelcp.com) Version: 1.1 About ZPanel ZPanel is an open- source web hosting control panel for Microsoft Windows and POSIX based

More information

Web Development using PHP (WD_PHP) Duration 1.5 months

Web Development using PHP (WD_PHP) Duration 1.5 months Duration 1.5 months Our program is a practical knowledge oriented program aimed at learning the techniques of web development using PHP, HTML, CSS & JavaScript. It has some unique features which are as

More information

Web Development Guide. Information Systems

Web Development Guide. Information Systems Web Development Guide Information Systems Gabriel Malveaux May 2013 Web Development Guide Getting Started In order to get started with your web development, you will need some basic software. In this guide

More information

An introduction to web programming with Java

An introduction to web programming with Java Chapter 1 An introduction to web programming with Java Objectives Knowledge Objectives (continued) The first page of a shopping cart application The second page of a shopping cart application Components

More information

Membuat Aplikasi Berita Sederhana

Membuat Aplikasi Berita Sederhana Pemrograman Web Membuat Aplikasi Berita Sederhana Merancang Struktur Database Membuat File Koneksi Database Membuat Halaman Input Berita Menampilkan Berita Terbaru di Halaman Depan Menampilkan Berita Lengkap

More information

SQL Injection. SQL Injection. CSCI 4971 Secure Software Principles. Rensselaer Polytechnic Institute. Spring 2010 ...

SQL Injection. SQL Injection. CSCI 4971 Secure Software Principles. Rensselaer Polytechnic Institute. Spring 2010 ... SQL Injection CSCI 4971 Secure Software Principles Rensselaer Polytechnic Institute Spring 2010 A Beginner s Example A hypothetical web application $result = mysql_query(

More information

How To Write A Program In Php 2.5.2.5 (Php)

How To Write A Program In Php 2.5.2.5 (Php) Exercises 1. Days in Month: Write a function daysinmonth that takes a month (between 1 and 12) as a parameter and returns the number of days in that month in a non-leap year. For example a call to daysinmonth(6)

More information

7 Web Databases. Access to Web Databases: Servlets, Applets. Java Server Pages PHP, PEAR. Languages: Java, PHP, Python,...

7 Web Databases. Access to Web Databases: Servlets, Applets. Java Server Pages PHP, PEAR. Languages: Java, PHP, Python,... 7 Web Databases Access to Web Databases: Servlets, Applets Java Server Pages PHP, PEAR Languages: Java, PHP, Python,... Prof. Dr. Dietmar Seipel 837 7.1 Access to Web Databases by Servlets Java Servlets

More information

Multimedia im Netz Online Multimedia Winter semester 2015/16. Tutorial 02 Minor Subject

Multimedia im Netz Online Multimedia Winter semester 2015/16. Tutorial 02 Minor Subject Multimedia im Netz Online Multimedia Winter semester 2015/16 Tutorial 02 Minor Subject Ludwig- Maximilians- Universität München Online Multimedia WS 2015/16 - Tutorial 02 for minor subject students 1 Today

More information

Python and MongoDB. Why?

Python and MongoDB. Why? Python and MongoDB Kevin Swingler Why? Python is becoming the scripting language of choice in big data It has a library for connecting to a MongoDB: PyMongo Nice mapping betwenpython data structures and

More information

G563 Quantitative Paleontology. SQL databases. An introduction. Department of Geological Sciences Indiana University. (c) 2012, P.

G563 Quantitative Paleontology. SQL databases. An introduction. Department of Geological Sciences Indiana University. (c) 2012, P. SQL databases An introduction AMP: Apache, mysql, PHP This installations installs the Apache webserver, the PHP scripting language, and the mysql database on your computer: Apache: runs in the background

More information

Using Cloud Databases in the Cloud Control Panel By J.R. Arredondo (@jrarredondo)

Using Cloud Databases in the Cloud Control Panel By J.R. Arredondo (@jrarredondo) Using Cloud Databases in the Cloud Control Panel By J.R. Arredondo (@jrarredondo) Cloud Databases is the latest relational database service from Rackspace. We have just made it available in the new Cloud

More information

Sample Code with Output

Sample Code with Output Sample Code with Output File Upload : In PHP, we can upload file to a server fileupload.html #menu a #content #italictext

More information

Intro to Web Programming. using PHP, HTTP, CSS, and Javascript Layton Smith CSE 4000

Intro to Web Programming. using PHP, HTTP, CSS, and Javascript Layton Smith CSE 4000 Intro to Web Programming using PHP, HTTP, CSS, and Javascript Layton Smith CSE 4000 Intro Types in PHP Advanced String Manipulation The foreach construct $_REQUEST environmental variable Correction on

More information

Advanced PostgreSQL SQL Injection and Filter Bypass Techniques

Advanced PostgreSQL SQL Injection and Filter Bypass Techniques Advanced PostgreSQL SQL Injection and Filter Bypass Techniques INFIGO-TD TD-200 2009-04 2009-06 06-17 Leon Juranić leon.juranic@infigo.hr INFIGO IS. All rights reserved. This document contains information

More information

Specialized Programme on Web Application Development using Open Source Tools

Specialized Programme on Web Application Development using Open Source Tools Specialized Programme on Web Application Development using Open Source Tools A. NAME OF INSTITUTE Centre For Development of Advanced Computing B. NAME/TITLE OF THE COURSE C. COURSE DATES WITH DURATION

More information

Advanced Object Oriented Database access using PDO. Marcus Börger

Advanced Object Oriented Database access using PDO. Marcus Börger Advanced Object Oriented Database access using PDO Marcus Börger ApacheCon EU 2005 Marcus Börger Advanced Object Oriented Database access using PDO 2 Intro PHP and Databases PHP 5 and PDO Marcus Börger

More information

Accessing External Databases from Mobile Applications

Accessing External Databases from Mobile Applications CENTER FOR CONVERGENCE AND EMERGING NETWORK TECHNOLOGIES CCENT Syracuse University TECHNICAL REPORT: T.R. 2014-003 Accessing External Databases from Mobile Applications Version 2.0 Authored by: Anirudh

More information

any other form. the information on these sites is volatile and subject to constant changes. other records are created through these sites.

any other form. the information on these sites is volatile and subject to constant changes. other records are created through these sites. 1. Preface There are several arguments why websites must be archived. the content of intra/internet sites of public administrations can determine the acts and decisions of citizens and other services.

More information

Entrance exam for PBA in Web Development

Entrance exam for PBA in Web Development Entrance exam for PBA in Web Development Fill out your personal details below. Full name: CPR-number: E-mail address: 1 PART I: Overall knowledge In this test you will find 35 questions covering different

More information

Advanced Web Development SCOPE OF WEB DEVELOPMENT INDUSTRY

Advanced Web Development SCOPE OF WEB DEVELOPMENT INDUSTRY Advanced Web Development Duration: 6 Months SCOPE OF WEB DEVELOPMENT INDUSTRY Web development jobs have taken thе hot seat when it comes to career opportunities and positions as a Web developer, as every

More information

Designing for Dynamic Content

Designing for Dynamic Content Designing for Dynamic Content Course Code (WEB1005M) James Todd Web Design BA (Hons) Summary This report will give a step-by-step account of the relevant processes that have been adopted during the construction

More information

PHP ON A FAST TRACK INTRODUCTION: ROADMAP BY JAROSLAW FRANCIK. Companion web site: http:// php.francik.name

PHP ON A FAST TRACK INTRODUCTION: ROADMAP BY JAROSLAW FRANCIK. Companion web site: http:// php.francik.name PHP ON A FAST TRACK BY JAROSLAW FRANCIK Companion web site: http:// php.francik.name Writing web based, database connected applications in PHP is not difficult, however many people get stuck on just the

More information

How To Let A Lecturer Know If Someone Is At A Lecture Or If They Are At A Guesthouse

How To Let A Lecturer Know If Someone Is At A Lecture Or If They Are At A Guesthouse Saya WebServer Mini-project report Introduction: The Saya WebServer mini-project is a multipurpose one. One use of it is when a lecturer (of the cs faculty) is at the reception desk and interested in knowing

More information

AD Phonebook 2.2. Installation and configuration. Dovestones Software

AD Phonebook 2.2. Installation and configuration. Dovestones Software AD Phonebook 2.2 Installation and configuration 1 Table of Contents Introduction... 3 AD Self Update... 3 Technical Support... 3 Prerequisites... 3 Installation... 3 Adding a service account and domain

More information

Web Development for Business Revision Pack

Web Development for Business Revision Pack Web Development for Business Revision Pack The exam is 3 hours. This is the second year that Web Development for Business has run and after feedback from students last year the paper structure has been

More information

Server-side scripting with PHP4

Server-side scripting with PHP4 Server-side scripting with PHP4 Michael Schacht Hansen (msh@hi.au.dk) Lars Riisgaard Ribe (lars.ribe@iekf.au.dk) Section for Health Informatics Faculty of Health Sciences University of Aarhus Denmark June

More information

Microsoft Access 3: Understanding and Creating Queries

Microsoft Access 3: Understanding and Creating Queries Microsoft Access 3: Understanding and Creating Queries In Access Level 2, we learned how to perform basic data retrievals by using Search & Replace functions and Sort & Filter functions. For more complex

More information

Hello friends, This is Aaditya Purani and i will show you how to Bypass PHP LFI(Local File Inclusion)

Hello friends, This is Aaditya Purani and i will show you how to Bypass PHP LFI(Local File Inclusion) #Title: PHP LFI Bypass #Date : 12-July-2015 #Tested on: Kali Linux/ Windows 7 #Category : Papers #Exploit Author : Aaditya Purani Hello friends, This is Aaditya Purani and i will show you how to Bypass

More information

Introduction to Web Development

Introduction to Web Development Introduction to Web Development Week 2 - HTML, CSS and PHP Dr. Paul Talaga 487 Rhodes paul.talaga@uc.edu ACM Lecture Series University of Cincinnati, OH October 16, 2012 1 / 1 HTML Syntax For Example:

More information

This document will describe how you can create your own, fully responsive. drag and drop email template to use in the email creator.

This document will describe how you can create your own, fully responsive. drag and drop email template to use in the email creator. 1 Introduction This document will describe how you can create your own, fully responsive drag and drop email template to use in the email creator. It includes ready-made HTML code that will allow you to

More information

The following steps detail how to prepare your database.

The following steps detail how to prepare your database. Using databases in Second Life or Open Sim to enhance user experience Tom Connors, SciEthis Interactive 2012 Second Life and Open Sim each have a built in system for editing the virtual world that allows

More information

When you have selected where you would like the form on your web page, insert these lines of code to start:

When you have selected where you would like the form on your web page, insert these lines of code to start: Mail Form Tutorial This tutorial will show you how to make use of SIUE s mail form script to allow web users to contact you via e mail regarding anything you wish. This script if most useful for receiving

More information

Final Design Document for Practicum Chat Program

Final Design Document for Practicum Chat Program Final Design Document for Practicum Chat Program Prepared by: Team Members: Raymond Chamberglain William Mason Jerrad Allen Elh Barry Franklin University CS Practicum April 12, 2008 Page 1 Purpose: This

More information

Fachgebiet Technische Informatik, Joachim Zumbrägel

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

More information

Detecting (and even preventing) SQL Injection Using the Percona Toolkit and Noinject!

Detecting (and even preventing) SQL Injection Using the Percona Toolkit and Noinject! Detecting (and even preventing) SQL Injection Using the Percona Toolkit and Noinject! Justin Swanhart Percona Live, April 2013 INTRODUCTION 2 Introduction 3 Who am I? What do I do? Why am I here? The tools

More information

Your First Web Database Program

Your First Web Database Program 4 Your First Web Database Program Chapter After you write the program Hello World, you re ready to go one step further. In this chapter, you will build a program that allows users to search a contact database

More information

Concepts Design Basics Command-line MySQL Security Loophole

Concepts Design Basics Command-line MySQL Security Loophole Part 2 Concepts Design Basics Command-line MySQL Security Loophole Databases Flat-file Database stores information in a single table usually adequate for simple collections of information Relational Database

More information

Topic 6: Introduction to Server Side Programming with PHP/MySQL. 4 Lecture Hrs, 4 Practical Hrs. Learning Objectives

Topic 6: Introduction to Server Side Programming with PHP/MySQL. 4 Lecture Hrs, 4 Practical Hrs. Learning Objectives Topic 6: Introduction to Server Side Programming with PHP/MySQL 4 Lecture Hrs, 4 Practical Hrs. Learning Objectives By completing this topic, the learner should be able to: Knowledge and Understanding

More information

Tutorial básico del método AJAX con PHP y MySQL

Tutorial básico del método AJAX con PHP y MySQL 1 de 14 02/06/2006 16:10 Tutorial básico del método AJAX con PHP y MySQL The XMLHttpRequest object is a handy dandy JavaScript object that offers a convenient way for webpages to get information from servers

More information

Web Application Guidelines

Web Application Guidelines Web Application Guidelines Web applications have become one of the most important topics in the security field. This is for several reasons: It can be simple for anyone to create working code without security

More information

Short notes on webpage programming languages

Short notes on webpage programming languages Short notes on webpage programming languages What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is a markup language A markup language is a set of

More information

Towards the end of the project: integrating our output design with php LIS458

Towards the end of the project: integrating our output design with php LIS458 Towards the end of the project: integrating our output design with php LIS458 We planned to enable our rela.onal database project as a web- enabled one, where the usual DB Administrator ac.vity of crea.ng

More information

RIPS. A static source code analyser for vulnerabilities in PHP scripts. NDS Seminar. A static source code analyser for vulnerabilities in PHP scripts

RIPS. A static source code analyser for vulnerabilities in PHP scripts. NDS Seminar. A static source code analyser for vulnerabilities in PHP scripts NDS Seminar 1 1.1 Motivation 1.2 PHP Vulnerabilities 1.3 Taint Analysis 1.4 Static VS Dynamic Code Analysis : RIPS 2.1 Configuration 2.2 The Tokenizer 2.3 Token Analysis 2.4 Webinterface 2.5 Results 2.6

More information

Embedded PHP. Web services vs. embedded PHP. CSE 190 M (Web Programming), Spring 2008 University of Washington

Embedded PHP. Web services vs. embedded PHP. CSE 190 M (Web Programming), Spring 2008 University of Washington Embedded PHP CSE 190 M (Web Programming), Spring 2008 University of Washington Except where otherwise noted, the contents of this presentation are Copyright 2008 Marty Stepp and Jessica Miller and are

More information

CREATING WEB FORMS WEB and FORMS FRAMES AND

CREATING WEB FORMS WEB and FORMS FRAMES AND CREATING CREATING WEB FORMS WEB and FORMS FRAMES AND FRAMES USING Using HTML HTML Creating Web Forms and Frames 1. What is a Web Form 2. What is a CGI Script File 3. Initiating the HTML File 4. Composing

More information

By Nabil ADOUI, member of the 4D Technical Support team

By Nabil ADOUI, member of the 4D Technical Support team XSLT with PHP By Nabil ADOUI, member of the 4D Technical Support team Contents Summary... 3 Introduction... 3 Important elements... 3 The PHP XSL library... 4 The PHP XSL API... 5 XSLTProcessor:: construct...

More information

VIDEO CONFERENCING TOOL

VIDEO CONFERENCING TOOL VIDEO CONFERENCING TOOL A Writing Project Presented to The Faculty of the Department of Computer Science San Jose State University In Partial Fulfillment of the Requirements for the Degree Master of Science

More information

Chapter 2: Interactive Web Applications

Chapter 2: Interactive Web Applications Chapter 2: Interactive Web Applications 2.1 Interactivity and Multimedia in the WWW architecture 2.2 Client-Side Multimedia in the Web (Example HTML5) 2.3 Interactive Server-Side Scripting (Example PHP)

More information

Programming MySQL with Visual C++ 6.0. Programming MySQL with Visual C++ 6.0 TUTORIAL. Jacques Abada 1 / 26

Programming MySQL with Visual C++ 6.0. Programming MySQL with Visual C++ 6.0 TUTORIAL. Jacques Abada 1 / 26 Programming MySQL with Visual C++ 6.0 TUTORIAL BY Jacques Abada Version 1.0 October 22 2001 1 / 26 Document entirely written with StarOffice 5.2 under Windows PDF file made with Acrobat 5 Copyright 2001,

More information

Using Database Metadata and its Semantics to Generate Automatic and Dynamic Web Entry Forms

Using Database Metadata and its Semantics to Generate Automatic and Dynamic Web Entry Forms Using Database Metadata and its Semantics to Generate Automatic and Dynamic Web Entry Forms Mohammed M. Elsheh and Mick J. Ridley Abstract Automatic and dynamic generation of Web applications is the future

More information

Introduction to Web Technologies

Introduction to Web Technologies Introduction to Web Technologies Tara Murphy 17th February, 2011 The Internet CGI Web services HTML and CSS 2 The Internet is a network of networks ˆ The Internet is the descendant of ARPANET (Advanced

More information

Advanced Web Security, Lab

Advanced Web Security, Lab Advanced Web Security, Lab Web Server Security: Attacking and Defending November 13, 2013 Read this earlier than one day before the lab! Note that you will not have any internet access during the lab,

More information

INFORMATION BROCHURE Certificate Course in Web Design Using PHP/MySQL

INFORMATION BROCHURE Certificate Course in Web Design Using PHP/MySQL INFORMATION BROCHURE OF Certificate Course in Web Design Using PHP/MySQL National Institute of Electronics & Information Technology (An Autonomous Scientific Society of Department of Information Technology,

More information

Web Development Frameworks. Matthias Korn <mkorn@cs.au.dk>

Web Development Frameworks. Matthias Korn <mkorn@cs.au.dk> Web Development Frameworks Matthias Korn 1 Overview Frameworks Introduction to CakePHP CakePHP in Practice 2 Web application frameworks Web application frameworks help developers build

More information

Chat Window Skinning Creation Guide

Chat Window Skinning Creation Guide Chat Window Skinning Creation Guide Throughout the course of a chat conversation, there are a number of different web pages that are displayed to your website visitors, including: The pre-chat survey The

More information

BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 6 Professional Graduate Diploma in IT WEB ENGINEERING

BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 6 Professional Graduate Diploma in IT WEB ENGINEERING BCS THE CHARTERED INSTITUTE FOR IT BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 6 Professional Graduate Diploma in IT WEB ENGINEERING Wednesday 26 th March 2014 - Morning Answer any THREE questions out

More information

How To Create A Web Database From A Multimedia Resources Database On A Microsoft Web Browser On A Pc Or Mac Or Mac (For Free) On A Mac Or Ipad Or Ipa (For Cheap) On Pc Or Ipam (For Money

How To Create A Web Database From A Multimedia Resources Database On A Microsoft Web Browser On A Pc Or Mac Or Mac (For Free) On A Mac Or Ipad Or Ipa (For Cheap) On Pc Or Ipam (For Money How to Build a Web Database: A Case Study Introduction This paper shows you how to build a simple Web application using ColdFusion. If you follow the sample case study of the multimedia resources database

More information

Course Outline Basic Web Development

Course Outline Basic Web Development Course Outline Basic Web Development For Professionals Who Can Participate? Anyone can join who has the interest to get into the creative web development profession. Prerequisite: Technical Skill: Must

More information

Analysis of Web Application Security

Analysis of Web Application Security Analysis of Web Application Security Yih Kuen Tsay ( 蔡 益 坤 ) Dept. of Information Management National Taiwan University Joint work with Chen I Chung, Chih Pin Tai, Chen Ming Yao, Rui Yuan Yeh, and Sheng

More information

Version 4.5 Web Application Example

Version 4.5 Web Application Example Version 4.5 Web Application Example MetaCase Document No. WA-4.5 Copyright 2008 by MetaCase Oy. All rights reserved First Printing, 1 st Edition, September 2008. MetaCase Ylistönmäentie 31 FI 40500 Jyväskylä

More information

Big Data Meets Infosec Visualiza4on. Forensics Challenge 10 Honeynet.org

Big Data Meets Infosec Visualiza4on. Forensics Challenge 10 Honeynet.org Big Data Meets Infosec Visualiza4on Forensics Challenge 10 Honeynet.org Challenge Design and build a visualiza4on that describes the aaacks that were analyzed in FC5. Use the three prize winners solu4ons

More information

A SQL Injection : Internal Investigation of Injection, Detection and Prevention of SQL Injection Attacks

A SQL Injection : Internal Investigation of Injection, Detection and Prevention of SQL Injection Attacks A SQL Injection : Internal Investigation of Injection, Detection and Prevention of SQL Injection Attacks Abhay K. Kolhe Faculty, Dept. Of Computer Engineering MPSTME, NMIMS Mumbai, India Pratik Adhikari

More information

P E R F O R M A N C E A N A LY S I S O F W E B P R O G R A M M I N G L A N G U A G E S

P E R F O R M A N C E A N A LY S I S O F W E B P R O G R A M M I N G L A N G U A G E S Himanshu Kumar Yu Song Columbia University Fall 2007 P E R F O R M A N C E A N A LY S I S O F W E B P R O G R A M M I N G L A N G U A G E S Abstract Using a benchmark script that renders a table from an

More information

Java Server Pages combined with servlets in action. Generals. Java Servlets

Java Server Pages combined with servlets in action. Generals. Java Servlets Java Server Pages combined with servlets in action We want to create a small web application (library), that illustrates the usage of JavaServer Pages combined with Java Servlets. We use the JavaServer

More information

Smart Home Security System Based on Microcontroller Using Internet and Android Smartphone

Smart Home Security System Based on Microcontroller Using Internet and Android Smartphone International Conference on Materials, Electronics & Information Engineering, ICMEIE-205 05-06 June, 205, Faculty of Engineering, University of Rajshahi, Bangladesh www.ru.ac.bd/icmeie205/proceedings/

More information

Example for Using the PrestaShop Web Service : CRUD

Example for Using the PrestaShop Web Service : CRUD Example for Using the PrestaShop Web Service : CRUD This tutorial shows you how to use the PrestaShop web service with PHP library by creating a "CRUD". Prerequisites: - PrestaShop 1.4 installed on a server

More information