PHP & MySQL Database. Database Systems CSCI Dr. Tom Hicks Computer Science Department

Size: px
Start display at page:

Download "PHP & MySQL Database. Database Systems CSCI Dr. Tom Hicks Computer Science Department"

Transcription

1 PHP & MySQL Database Database Systems CSCI-3343 Dr. Tom Hicks Computer Science Department 1

2 WWW Organization It Is A Good Idea To Create A Folder For Each Web Page Place Most Items, On Page, In That Folder! 2

3 WWW SetUp 3

4 Create Folders Quadratic, FirstPrime, & RandomNo 4

5 Drag.php Pages Into Their Proper Folders If You Do So Inside Expression Web, The Links Will Adjust Within Site! (You Will Not Have To Change Main-Menu.php) 5

6 Add The Link Below To The Bottom Of Quadratic.php RandomNo.php FirstPrime.php <p><a href="../main-menu.php"> Return To Main Menu </A> Add The Link Below To The Bottom Of Each Of Your Other Pages As Well! 6

7 Database Export With A Script! 7

8 MySQL Native Import - Export 8

9 Command Line Export Database Use mysqldump! cd C:\Program Files\MySQL\MySQL Server 8.0\bin mysqldump -ptrinity -uroot stanford > c:\temp\stanford2.sql 9

10 Database Export With MySQL Workbench - Done 10

11 Database Import With A Script! 11

12 Command Line Import Database Use mysql! Create database Stanford2 must be created before the import! cd C:\Program Files\MySQL\MySQL Server 8.0\bin mysql -ptrinity -uroot stanford2 < c:\temp\stanford2.sql 12

13 Database Import With MySQL Workbench - Done 13

14 phpinfo() 14

15 Create Page Student-Display.php Student-Display.php Confirm that the PHP is working! <?php phpinfo();?> 15

16 Connect To MySQL Database 16

17 Create Folder Student-Display 17

18 Create Page Use Expression Web To Create Page Student-Display.php 18

19 Modify Menu Page Link Student-Display.php 19

20 Modify Page Student-Display.php Add The Code: <?PHP /*============================================================= === Connect To MySQL Database === =============================================================*/ $server ="localhost"; $username="root"; $password="trinity"; $database="libraryth1"; $con=mysqli_connect($server, $username, $password, $database);?> We Changed The Original PHP.ini To Make This Work! 20

21 Create Page Student-Display.php This is the same as the previous page! <?php /*============================================================= === Connect To MySQL Database === =============================================================*/ $conn = new mysqli(); $conn->connect("localhost","root","trinity","libraryth");?> We Changed The Original PHP.ini To Make This Work! 21

22 Modify php.ini -3- Edit C:\Program Files\PHP\php.ini In order to keep PHP lean and mean, many of the optional extensions are turned off. We must turn on the MySQL extensions. We Changed The Original PHP.ini To Make This Work! 22

23 Modify php.ini -4A- We must often tell the system where we are storing these optional (MySQL) extensions. We Changed The Original PHP.ini To Make This Work! 23

24 Modify php.ini -4B- Edit C:\Program Files\PHP\php.ini We must often tell the system where we are storing these optional (MySQL) extensions. We Changed The Original PHP.ini To Make This Work! 24

25 Database Query 25

26 Modify Page Student-Display.php -1- Change the connection portion to the following: <?PHP /*============================================================= === Connect To MySQL Database === =============================================================*/ $server ="localhost"; $username="stanforduser"; $password="trinity"; //Use Your Password $database="stanford"; $con=mysqli_connect($server, $username, $password, $database);?> 26

27 Stanford User Privileges On Stanford DB Stanford Cannot Change DB. <?PHP /*============================================================= === Connect To MySQL Database === =============================================================*/ $server ="localhost"; $username="stanforduser"; $password="trinity"; //Use Your Password $database="stanford"; $con=mysqli_connect($server, $username, $password, $database);?> 27

28 Try Bad Server localhost1 <?PHP /*============================================================= === Connect To MySQL Database === =============================================================*/ $server ="localhost1"; $username="stanforduser"; $password="trinity"; //Use Your Password $database="stanford"; $con=mysqli_connect($server, $username, $password, $database);?> 28

29 Try Bad UserName StanfordUser1 <?PHP /*============================================================= === Connect To MySQL Database === =============================================================*/ $server ="localhost"; $username="stanforduser1"; $password="trinity"; //Use Your Password $database="stanford"; $con=mysqli_connect($server, $username, $password, $database);?> 29

30 Try Bad Password trinity1 <?PHP /*============================================================= === Connect To MySQL Database === =============================================================*/ $server ="localhost"; $username="stanforduser1"; $password="trinity1"; //Use Your Password $database="stanford"; $con=mysqli_connect($server, $username, $password, $database);?> 30

31 Try Bad Database stanford1 <?PHP /*============================================================= === Connect To MySQL Database === =============================================================*/ $server ="localhost"; $username="stanforduser1"; $password="trinity"; //Use Your Password $database="stanford1"; $con=mysqli_connect($server, $username, $password, $database);?> 31

32 Blank Is Good!-1- Connection Established! <?PHP /*============================================================= === Connect To MySQL Database === =============================================================*/ $server ="localhost"; $username="stanforduser"; $password="trinity"; //Use Your Password $database="stanford"; $con=mysqli_connect($server, $username, $password, $database);?> 32

33 Modify Page Student-Display.php -2- Add the Query : Use Your Name!... /*============================================================= === Query === =============================================================*/ $query = "SELECT * FROM Users"; $recset = $conn->query($query); echo "<CENTER><H1> Display Students </H1></CENTER>"; echo "<CENTER><H2> Written By Dr. Tom Hicks </H2></CENTER><HR>";?> 33

34 Modify Page Student-Display.php -3- Cycle Through The Record Set Loop: print the data... echo "<CENTER><H1> Display Students</H1></CENTER>"; echo "<CENTER><H2> Written By Dr. Tom Hicks </H2></CENTER><HR>"; echo "<pre><p>"; /*============================================================= === Loop Through Records In Record Set === =============================================================*/ while(list($sid, $sname, $GPA) = $recset->fetch_row()) printf("<strong>%3d %-15s %4.2f </strong> <BR>", $sid, $sname, $GPA); echo "</h2></pre>";?> <p><a href="../main-menu.php"> Return To Main Menu </A> 34

35 Modify Page Student-Display.php -3- There are several ways to connect. There are a number of ways to walk through the records. 35

36 Inefficient! Why Read All Of Data If Only Going To Display Part? 36

37 More Efficient! Reduce The Transfer Of Data 37

38 Modify Page Student-Display.php -4- There are other ways to Generate the same output. /*============================================================= === Loop Through Records In Record Set === =============================================================*/ while($rec = $recset->fetch_row()) printf("<b>%3d %-15s %4.2f </B> <BR>", $Rec[0], $Rec[1], $Rec[2]); echo "</h2></pre>"; 38

39 About PHP & MySQL Special Thanks To PHP.net For Some Of The Following Documentation 39

40 API Application Programming Interface An Application Programming Interface, or API, defines the classes, methods, functions and variables that your application will need to call in order to carry out its desired task. In the case of PHP applications that need to communicate with databases the necessary APIs are usually exposed via PHP extensions. APIs can be Procedural or Object-Oriented. With a procedural API you call functions to carry out tasks With the object-oriented API you instantiate classes and then call methods on the resulting objects. The Object-Priented API is usually the Preferred Interface, as it is more modern and leads to better organized code. When writing PHP applications that need to connect to the MySQL server there are several API options available. 40

41 MySQL Connector In the MySQL documentation, the term Connector refers to a piece of software that allows your application to connect to the MySQL database server. MySQL provides connectors for a variety of languages, including PHP. 41

42 PHP Extension In the PHP documentation you will come across another term - Extension. The PHP code consists of a core, with optional extensions to the core functionality. PHP's MySQL-related extensions, such as the mysqli extension, and the mysql extension, are implemented using the PHP extension framework. An extension typically exposes an API to the PHP programmer, to allow its facilities to be used programmatically. However, some extensions which use the PHP extension framework do not expose an API to the PHP programmer. The PDO MySQL driver extension, for example, does not expose an API to the PHP programmer, but provides an interface to the PDO layer above it. The terms API and extension should not be taken to mean the same thing, as an extension may not necessarily expose an API to the programmer. 42

43 Main PHP API Offerings For MySQL There are three main API options when considering connecting to a MySQL database server: PHP's MySQL Extension PHP's mysqli Extension PHP Data Objects (PDO) 43

44 PHP's MySQL Extension This is the Original Extension designed to allow you to develop PHP applications that interact with a MySQL database. The mysql extension provides a procedural interface and is intended for use only with MySQL versions older than This extension can be used with versions of MySQL or newer, but not all of the latest MySQL server features will be available. This Is Old Technology!: The majority of references on the Internet demonstrate how to use the MySQL Extension. If you are using MySQL versions or later it is strongly recommended that you use the mysqli extension instead. YES The MySQL Extension is being phased out! The mysql extension source code is located in the PHP extension directory ext/mysql. 44

45 PHP's mysqli Extension 1 The mysqli extension, or as it is sometimes known, the MySQL improved extension, was developed to take advantage of new features found in MySQL systems versions and newer. The mysqli extension is included with PHP versions 5 and later. The mysqli extension has a number of benefits, the key enhancements over the mysql extension being: Object-oriented interface Support for Prepared Statements Support for Multiple Statements Support for Transactions Enhanced debugging capabilities Embedded server support 45

46 PHP's mysqli Extension 2 If you are using MySQL versions or later it is strongly recommended that you use this extension. As well as the Object-Oriented Interface the extension also provides a Procedural Interface. The mysqli extension is built using the PHP extension framework, its source code is located in the directory ext/mysqli. 46

47 PHP Data Objects (PDO) PHP Data Objects, or PDO, is a database abstraction layer specifically for PHP applications. PDO provides a consistent API for your PHP application regardless of the type of database server your application will connect to. In theory, if you are using the PDO API, you could switch the database server you used, from say Firebird to MySQL, and only need to make minor changes to your PHP code. While PDO has its advantages, such as a clean, simple, portable API, its main disadvantage is that it doesn't allow you to use all of the advanced features that are available in the latest versions of MySQL server. For example, PDO does not allow you to use MySQL's support for Multiple Statements. PDO is implemented using the PHP extension framework, its source code is located in the directory ext/pdo. 47

48

49

50

51 Database Applications Have Many Connections 51

52 Create Folder C:\InetPub\wwwroot\Secure-Connect 52

53 Create Page Connection.php -1- It is often the case that there might be hundreds of web pages that access a single database. Passwords change. The database host can change. We would like an easy way to be able to change the password only one time. Create page Connection.asp include it hundreds of times! When the time comes to make a change, do it once. Save In Folder Secure- Connect! <?PHP /*============================================================= === Connect To MySQL Database === =============================================================*/ $server ="localhost"; $username="stanforduser"; $password="trinity"; //Use Your Password $database="stanford"; $con=mysqli_connect($server, $username, $password, $database);?> 53

54 Save a Copy of Student-Display.php in Folder C:\InetPub\wwwroot\StudentoDisplay Call It TestSecureConnection.php 54

55 <?PHP Modify Page TestSecureConnection.php /*============================================================= === Connect To MySQL Database === =============================================================*/ include_once "../../Secure-Connect/Connection.php"; /*============================================================= === Query 2 === =============================================================*/ $query2 = "SELECT sid, sname, GPA FROM Student"; $recset2 = $con->query($query); echo "<CENTER><H1> Display Students</H1></CENTER>"; echo "<CENTER><H2> Written By Dr. Tom Hicks </H2></CENTER><HR>"; echo "<pre><p>"; /*============================================================= === Loop Through Records In Record Set === =============================================================*/ while($rec2 = $recset->fetch_row()) printf("<b>%3d %-15s %4.2f </B> <BR>", $Rec2[0], $Rec2[1], $Rec2[2]); echo "</h2></pre>";?> 55

56 Link TestSecureConnection.php 56

57 Connection Page Works! 57

58 Some PHP Pages Have Many Queries 58

59 Save a Copy of TestSecureConnection.php in Folder C:\InetPub\wwwroot\StudentoDisplay Call It TestMultipleQueries.php 59

60 Make The Link To Main-Menu.php Goal 60

61 Change /*============================================================= === Query === =============================================================*/ $query = "SELECT sid, sname, GPA FROM Student"; $recset = $con->query($query); To /*============================================================= === Query 2 === =============================================================*/ $query2 = "SELECT sid, sname, GPA FROM Student"; $recset2 = $con->query($query2); 61

62 Change /*============================================================= === Loop Through Records In Record Set === =============================================================*/ while($rec = $recset-> fetch_row()) printf("<b>%3d %-15s %4.2f </B> <BR>", $Rec[0], $Rec[1], $Rec[2]); To /*============================================================= === Loop Through Records In Record Set === =============================================================*/ while($rec1 = $recset2-> fetch_row()) printf("<b>%3d %-15s %4.2f </B> <BR>", $Rec1[0], $Rec1[1], $Rec1[2]); 62

63 Add A Print Statement echo "<pre><p>"; /*============================================================ === Loop Through Records In Record Set === =============================================================*/ $query1 = "SELECT COUNT(*) AS NoStudents FROM Student"; $recset1 = $con->query($query1); $Rec = $recset1->fetch_row(); echo "<pre><p>"; print "No Students = ". $Rec[0]. "<p><hr>"; /*============================================================ === Loop Through Records In Record Set === =============================================================*/ $query1 = "SELECT COUNT(*) AS NoStudents FROM Student"; $recset1 = $con->query($query1); $Rec = $recset1->fetch_row(); 63

64 One Connection - Multiple Queries! 64

65 WWW GUI Can Help You Provide Nicely Formatted Output 65

66 Flyspeed Query 66

67 Results Of Query We Would Like To Do On A Nicely Formatted Web Page! 67

68 Goal! 68

69 Inside Folder C:\inetpub\wwwroot\PHP Create Folder Stanford-Student-Apply 69

70 Inside Folder Stanford-Student-Apply Use Expression Web To Create Stanford- Student-Apply.php 70

71 Link The New Page 71

72 Configure Your Page Properties 72

73 Configure Your Page Properties 73

74 Configure Your Page Properties 74

75 Create The Following With Arial Font Use Your Name 75

76 Move Your Cursor Below The Horizontal Rule: Insert A New Table On Your Page 76

77 Configure Your Table As Shown Below 77

78 You Should Now Have The Start Of Your Table 78

79 Add The The Following Titles To The First Row Use Arial Font 79

80 Select All Of The Cells In Row 1 Right-Mouse Click On One Select Cell Properties 80

81 Configure The Cells: Dark Blue 81

82 Change The Font Color In The First Row To White 82

83 Insert XX Into Each Cell In Row 2 83

84 Select All The Cells In Row 2 & Configure As Shown Below Dark Blue 84

85 Add The Connection Before The Table 85

86 Add Your Query 86

87 Add The Connection Before The Table 87

88 We Need To Cycle Through Our Records Each Cycke Will Create One Of These Rows 88

89 Add Your Loop 89

90 Making Progress 90

91 Finish It Up! 91

92 Making Progress Numerical Values Should Be Right Justified 92

93 Right-Justify All Three Numeric Fields Numerical Values Should Be Right Justified 93

94 Center 1 Character Fields 94

95 Nice Format Easier With GUI 95

96 Don't Forget To Include A Return On All Pages 96

97 Database Systems CSCI 3343 Dr. Thomas E. Hicks Computer Science Department Trinity University 97

HTML Forms & PHP & MySQL Database. Database Systems CSCI-3343 Dr. Tom Hicks Computer Science Department

HTML Forms & PHP & MySQL Database. Database Systems CSCI-3343 Dr. Tom Hicks Computer Science Department HTML Forms & PHP & MySQL Database Database Systems CSCI-3343 Dr. Tom Hicks Computer Science Department 1 Import Database University1 with MySQL Workbench 2 It Should Have 3 Tables 3 Create Folders 4 Create

More information

HTML Forms & PHP. Database Systems CSCI Dr. Tom Hicks Computer Science Department

HTML Forms & PHP. Database Systems CSCI Dr. Tom Hicks Computer Science Department HTML Forms & PHP Database Systems CSCI-3343 Dr. Tom Hicks Computer Science Department Create Page Faculty-Add.php AddFaculty Page Create page Faculty-Add.php It will be blank for the moment. We are going

More information

Install & Configure Windows 10, Visual Studio, & MySQL Dr. Tom Hicks Trinity University

Install & Configure Windows 10, Visual Studio, & MySQL Dr. Tom Hicks Trinity University Install & Configure Windows 10, Visual Studio, & MySQL Dr. Tom Hicks Trinity University Windows 10 Install 1] Push the Next Button. 2] Push the Install Now Button. Windows-Database-Server-Installation-1.docx

More information

Using PHP with MYSQL

Using PHP with MYSQL Using PHP with MYSQL PHP & MYSQL So far you've learned the theory behind relational databases and worked directly with MySQL through the mysql command-line tool. Now it's time to get your PHP scripts talking

More information

Intro To HTML & Web & Relational Queries Individual Assignment 30 Points

Intro To HTML & Web & Relational Queries Individual Assignment 30 Points If this lab is an Individual assignment, you must do all coded programs on your own. You may ask others for help on the language syntax, but you must organize and present your own logical solution to the

More information

Intro-PHP-HW.docx CSCI 3343 Initials P a g e 1

Intro-PHP-HW.docx CSCI 3343 Initials P a g e 1 Intro-PHP-HW.docx CSCI 3343 Initials P a g e 1 If this lab is an Individual assignment, you must do all coded programs on your own. You may ask others for help on the language syntax, but you must organize

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

Networks and Web for Health Informatics (HINF 6220) Tutorial 13 : PHP 29 Oct 2015

Networks and Web for Health Informatics (HINF 6220) Tutorial 13 : PHP 29 Oct 2015 Networks and Web for Health Informatics (HINF 6220) Tutorial 13 : PHP 29 Oct 2015 PHP Arrays o Arrays are single variables that store multiple values at the same time! o Consider having a list of values

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

MySQL: Access Via PHP

MySQL: Access Via PHP MySQL: Access Via PHP CISC 282 November 15, 2017 phpmyadmin: Login http://cisc282.caslab. queensu.ca/phpmyadmin/ Use your NetID and CISC 282 password to log in 2 phpmyadmin: Select DB Clicking on this

More information

Server 2 - MySQL #1 Lab

Server 2 - MySQL #1 Lab Server-Configuration-2-MySQL-1-HW.docx CSCI 2320 Initials P a g e 1 If this lab is an Individual assignment, you must do all coded programs on your own. You may ask others for help on the language syntax,

More information

Setting up Omeka on IU s Webserve

Setting up Omeka on IU s Webserve Setting up Omeka on IU s Webserve Request Webserve Account Consult the "Getting Started" document before you request a Webserve account. The following steps are required: 1. Request a Group Account 1.

More information

Chapters 10 & 11 PHP AND MYSQL

Chapters 10 & 11 PHP AND MYSQL Chapters 10 & 11 PHP AND MYSQL Getting Started The database for a Web app would be created before accessing it from the web. Complete the design and create the tables independently. Use phpmyadmin, for

More information

Infotek Solutions Inc.

Infotek Solutions Inc. Infotek Solutions Inc. Read Data from Database and input in Flight Reservation login logout and add Check point in QTP: In this tutorial we will read data from mysql database and give the input to login

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

Chapter 10: MySQL & PHP. PHP and MySQL CIS 86 Mission College

Chapter 10: MySQL & PHP. PHP and MySQL CIS 86 Mission College Chapter 10: MySQL & PHP PHP and MySQL CIS 86 Mission College Tonight s agenda Drop the class? Login file Connecting to a MySQL database Object-oriented PHP Executing a query Fetching a result Fetching

More information

Locate your Advanced Tools and Applications

Locate your Advanced Tools and Applications MySQL Manager is a web based MySQL client that allows you to create and manipulate a maximum of two MySQL databases. MySQL Manager is designed for advanced users.. 1 Contents Locate your Advanced Tools

More information

Install Visual Studio Community Version 2017

Install Visual Studio Community Version 2017 Dr. Tom Hicks Install Visual Studio Community Version 2017 1 P a g e Install Visual Studio Community Version 2017 1] Navigate your browser to https://www.visualstudio.com/ 2] Hold down the Download Visual

More information

MySQL SERVER INSTALLATION, CONFIGURATION, AND HOW TO USE WITH STARCODE NETWORK

MySQL SERVER INSTALLATION, CONFIGURATION, AND HOW TO USE WITH STARCODE NETWORK MySQL SERVER INSTALLATION, CONFIGURATION, AND HOW TO USE WITH STARCODE NETWORK This document describes how to install MySQL server (5.7.19) on Windows PC, and how to use StarCode Network with MySQL server

More information

Apache, Php, MySql Configuration

Apache, Php, MySql Configuration 1.0 Introduction Apache, Php, MySql Configuration You will be guided to install the Apache web server and PHP and then configure them with MySQL database. There are several pre-requisite tasks MUST be

More information

! Quick review of ! normalization! referential integrity ! Basic MySQL ! Other types of DBs

! Quick review of ! normalization! referential integrity ! Basic MySQL ! Other types of DBs CS 418/518 Web Programming Spring 2014 MySQL Dr. Michele Weigle http://www.cs.odu.edu/~mweigle/cs418-s14/ Outline! Assigned Reading! Chapter 3 "Using PHP5 with MySQL"! Chapter 10 "Building Databases"!

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

PHP and MySQL Programming

PHP and MySQL Programming PHP and MySQL Programming Course PHP - 5 Days - Instructor-led - Hands on Introduction PHP and MySQL are two of today s most popular, open-source tools for server-side web programming. In this five day,

More information

Installation of Actiheart Data Analysis Suite:

Installation of Actiheart Data Analysis Suite: Installation of Actiheart Data Analysis Suite: Currently software is only compatible with XP platform and version 6 of Java. Installation requires: - Windows XP platform - MySQL installation - Folders:

More information

Preparing Your Working Environment

Preparing Your Working Environment A Preparing Your Working Environment In order to avoid any headaches while going through the case studies in this book, it's best to install the necessary software and configure your environment the right

More information

MySQL SERVER INSTALLATION, CONFIGURATION, AND HOW TO USE WITH STARCODE NETWORK

MySQL SERVER INSTALLATION, CONFIGURATION, AND HOW TO USE WITH STARCODE NETWORK MySQL SERVER INSTALLATION, CONFIGURATION, AND HOW TO USE WITH STARCODE NETWORK This document describes how to install MySQL server (version 5.7.19) on Windows PC, and how to use StarCode Network with MySQL

More information

IIS & Web & PHP Configuration Dr. Tom Hicks Trinity University

IIS & Web & PHP Configuration Dr. Tom Hicks Trinity University IIS & Web & PHP Configuration Dr. Tom Hicks Trinity University Install IIS (Internet Information Services) 1] Open the Control Panel. Push the Programs & Features Button. IIS-Web-PHP-Configuration-Key.docx

More information

Integrating Mahara with Moodle running under https

Integrating Mahara with Moodle running under https Server environment: Integrating Mahara 1.8.1 with Moodle 2.6.1 running under https Windows 2012 SP2 server on both machines Internet Information Services 9.5 PostgresSQL 9.3 PHP version 5.5.8 Installation

More information

XAMPP Web Development Stack

XAMPP Web Development Stack Overview @author R.L. Martinez, Ph.D. The steps below outline the processes for installing the XAMPP stack on a local machine. The XAMPP (pronounced Zamp) stack includes the following: Apache HTTP Server,

More information

This lecture. PHP tags

This lecture. PHP tags This lecture Databases I This covers the (absolute) basics of and how to connect to a database using MDB2. (GF Royle 2006-8, N Spadaccini 2008) I 1 / 24 (GF Royle 2006-8, N Spadaccini 2008) I 2 / 24 What

More information

Databases PHP I. (GF Royle, N Spadaccini ) PHP I 1 / 24

Databases PHP I. (GF Royle, N Spadaccini ) PHP I 1 / 24 Databases PHP I (GF Royle, N Spadaccini 2006-2010) PHP I 1 / 24 This lecture This covers the (absolute) basics of PHP and how to connect to a database using MDB2. (GF Royle, N Spadaccini 2006-2010) PHP

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

AN INTRODUCTION TO WEB PROGRAMMING. Dr. Hossein Hakimzadeh Department of Computer and Information Sciences Indiana University South Bend, IN

AN INTRODUCTION TO WEB PROGRAMMING. Dr. Hossein Hakimzadeh Department of Computer and Information Sciences Indiana University South Bend, IN AN INTRODUCTION TO WEB PROGRAMMING Dr. Hossein Hakimzadeh Department of Computer and Information Sciences Indiana University South Bend, IN HISTORY Developed by Michael Widenius. Initially release in 1995.

More information

= 3 + (5*4) + (1/2)*(4/2)^2.

= 3 + (5*4) + (1/2)*(4/2)^2. Physics 100 Lab 1: Use of a Spreadsheet to Analyze Data by Kenneth Hahn and Michael Goggin In this lab you will learn how to enter data into a spreadsheet and to manipulate the data in meaningful ways.

More information

DB-Queries-1 - REVIEW Individual 20 Points

DB-Queries-1 - REVIEW Individual 20 Points DB-Queries-1.docx CSCI 2320 Initials P a g e 1 If this lab is an Individual assignment, you must do all coded programs on your own. You may ask others for help on the language syntax, but you must organize

More information

Text. Text metrics. There are some important metrics that we must consider when working with text. Figure 4-1 shows the basics.

Text. Text metrics. There are some important metrics that we must consider when working with text. Figure 4-1 shows the basics. Text Drawing text has some special properties and thus is treated in a separate chapter. We first need to talk about the sizing of text. Then we discuss fonts and how text is actually drawn. There is then

More information

OpenPro Installation Instructions

OpenPro Installation Instructions OpenPro ERP Software Installation Guide 10061 Talbert Ave Suite 200 Fountain Valley, CA 92708 USA Phone 714-378-4600 Fax 714-964-1491 www.openpro.com infoop@openpro.com OpenPro Installation of Software

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

Introduction to IBM Rational HATS For IBM System i (5250)

Introduction to IBM Rational HATS For IBM System i (5250) Introduction to IBM Rational HATS For IBM System i (5250) Introduction to IBM Rational HATS 1 Lab instructions This lab teaches you how to use IBM Rational HATS to create a Web application capable of transforming

More information

Start to Finish: Set up a New Account or Use Your Own

Start to Finish: Set up a New Account or Use Your Own Better Technology, Onsite and Personal Connecting NIOGA s Communities www.btopexpress.org www.nioga.org [Type Email Start to Finish: Set up a New Account or Use Your Own Overview: Set up a free email account

More information

CSCI 4000 Assignment 6

CSCI 4000 Assignment 6 Austin Peay State University, Tennessee Spring 2018 CSCI 4000: Advanced Web Development Dr. Leong Lee CSCI 4000 Assignment 6 Total estimated time for this assignment: 6 hours (if you are a good programmer)

More information

Creating Forms. Starting the Page. another way of applying a template to a page.

Creating Forms. Starting the Page. another way of applying a template to a page. Creating Forms Chapter 9 Forms allow information to be obtained from users of a web site. The ability for someone to purchase items over the internet or receive information from internet users has become

More information

Data Analysis and Integration

Data Analysis and Integration MEIC 2015/2016 Data Analysis and Integration Lab 5: Working with databases 1 st semester Installing MySQL 1. Download MySQL Community Server for your operating system. For Windows, use one of the following

More information

Developing a Home Page

Developing a Home Page FrontPage Developing a Home Page Opening Front Page Select Start on the bottom menu and then Programs, Microsoft Office, and Microsoft FrontPage. When FrontPage opens you will see a menu and toolbars similar

More information

Download and Installation Instructions: After WAMP Server download start the installation:

Download and Installation Instructions: After WAMP Server download start the installation: SET UP Instruction to Set Up a WAMP SERVER with MySQL and to Create a Database in My SQL and Connect from your PHP Script Download WAMP Server V 3.0 or higher from: https://sourceforge.net/projects/wampserver/

More information

Handout created by Cheryl Tice, Instructional Support for Technology, GST BOCES

Handout created by Cheryl Tice, Instructional Support for Technology, GST BOCES Handout created by Cheryl Tice, Instructional Support for Technology, GST BOCES Intro to FrontPage OVERVIEW: This handout provides a general overview of Microsoft FrontPage. AUDIENCE: All Instructional

More information

OptiRain Open 2 Installation Guide for LInux. This guide provides general instructions for installing OptiRain Open 2 on a Linux based server.

OptiRain Open 2 Installation Guide for LInux. This guide provides general instructions for installing OptiRain Open 2 on a Linux based server. QUICKSMART OptiRain Open 2 Installation Guide for LInux QuickSmart Development P.O. Box 3689 Santa Clara, CA 95055 408-777-0944 www.quicksmart.com This guide provides general instructions for installing

More information

CSC 3300 Homework 3 Security & Languages

CSC 3300 Homework 3 Security & Languages CSC 3300 Homework 3 Security & Languages Description Homework 3 has two parts. Part 1 is an exercise in database security. In particular, Part 1 has practice problems in which your will add constraints

More information

CHAPTER 10. Connecting to Databases within PHP

CHAPTER 10. Connecting to Databases within PHP CHAPTER 10 Connecting to Databases within PHP CHAPTER OBJECTIVES Get a connection to a MySQL database from within PHP Use a particular database Send a query to the database Parse the query results Check

More information

Kollaborate Server. Installation Guide

Kollaborate Server. Installation Guide 1 Kollaborate Server Installation Guide Kollaborate Server is a local implementation of the Kollaborate cloud workflow system that allows you to run the service in-house on your own server and storage.

More information

Mysql Tutorial Create Database Username Password Through Phpmyadmin

Mysql Tutorial Create Database Username Password Through Phpmyadmin Mysql Tutorial Create Database Username Password Through Phpmyadmin Convert plain text to MD5 Hash and edit your MySQL Database. Every WordPress blog uses a MySQL Database which can be accessed through

More information

Introduction to Eclipse Rich Client Platform Support in IBM Rational HATS. For IBM System i (5250)

Introduction to Eclipse Rich Client Platform Support in IBM Rational HATS. For IBM System i (5250) Introduction to Eclipse Rich Client Platform Support in IBM Rational HATS For IBM System i (5250) 1 Lab instructions This lab teaches you how to use IBM Rational HATS to create a rich client plug-in application

More information

Html basics Course Outline

Html basics Course Outline Html basics Course Outline Description Learn the essential skills you will need to create your web pages with HTML. Topics include: adding text any hyperlinks, images and backgrounds, lists, tables, and

More information

MassTransit Server Installation Guide for Windows

MassTransit Server Installation Guide for Windows MassTransit 6.1.1 Server Installation Guide for Windows November 24, 2009 Group Logic, Inc. 1100 North Glebe Road, Suite 800 Arlington, VA 22201 Phone: 703-528-1555 Fax: 703-528-3296 E-mail: info@grouplogic.com

More information

Introduction to Eclipse Rich Client Platform Support in IBM Rational HATS For IBM System i (5250)

Introduction to Eclipse Rich Client Platform Support in IBM Rational HATS For IBM System i (5250) Introduction to Eclipse Rich Client Platform Support in IBM Rational HATS For IBM System i (5250) Introduction to Eclipse Rich Client Platform Support in IBM Rational HATS 1 Lab instructions This lab teaches

More information

Installing Joomla

Installing Joomla Installing Joomla 3.0.11 To start installing Joomla 3.X you have to copy the zipped file Joomla_3.0.1-Stable-Full_Package.zip to the folder in which you want to install Joomla 3.X. On a web host this is

More information

OpenScape Business V2

OpenScape Business V2 OpenScape Business V2 Description Open Directory Service ODBC-ODBC Bridge Version 1.3 Table of Contents 1. Overview 5 1.1. ODBC-Bridge Client 5 1.2. ODBC-Server 6 1.3. Access Control 6 1.4. Licensing 7

More information

macos High Sierra Apache Setup: Multiple PHP Versions First part in a multi-part blog series for Mac developers

macos High Sierra Apache Setup: Multiple PHP Versions First part in a multi-part blog series for Mac developers macos 10.13 High Sierra Apache Setup: Multiple PHP Versions First part in a multi-part blog series for Mac developers Andy Miller posted on 10/22/2017 in macos + sierra + apache + homebrew + php 14 mins

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

Introduction 3. Compatibility Matrix 3. Prerequisites 3

Introduction 3. Compatibility Matrix 3. Prerequisites 3 1 Ártica Soluciones Tecnológicas 2005-2018 INDEX Introduction 3 Compatibility Matrix 3 Prerequisites 3 Configuration 4 Settings related to the connection to the Cacti database 4 Settings relating to the

More information

Linux Network Administration. MySQL COMP1071 Summer 2017

Linux Network Administration. MySQL COMP1071 Summer 2017 Linux Network Administration MySQL COMP1071 Summer 2017 Databases Database is a term used to describe a collection of structured data A database software package contains the tools used to store, access,

More information

Objectives. Chapter 10. Developing Object-Oriented PHP. Introduction to Object-Oriented Programming

Objectives. Chapter 10. Developing Object-Oriented PHP. Introduction to Object-Oriented Programming Chapter 10 Developing Object-Oriented PHP PHP Programming with MySQL 2 nd Edition Objectives In this chapter, you will: Study object-oriented programming concepts Use objects in PHP scripts Declare data

More information

Bitnami MySQL for Huawei Enterprise Cloud

Bitnami MySQL for Huawei Enterprise Cloud Bitnami MySQL for Huawei Enterprise Cloud Description MySQL is a fast, reliable, scalable, and easy to use open-source relational database system. MySQL Server is intended for mission-critical, heavy-load

More information

CS 2316 Homework 9a GT Room Reservation Login

CS 2316 Homework 9a GT Room Reservation Login CS 2316 Homework 9a GT Room Reservation Login Due: Wednesday November 5th Out of 100 points Files to submit: 1. HW9.py This is an INDIVIDUAL assignment! Collaboration at a reasonable level will not result

More information

At the start of the project we all agreed to follow some basic procedures to make sure we did all of the things we should do.

At the start of the project we all agreed to follow some basic procedures to make sure we did all of the things we should do. Ethical Issues The candidate has given a straightforward explanation of ethical issues related to the management of information. At the start of the project we all agreed to follow some basic procedures

More information

Use of PHP for DB Connection. Middle and Information Tier. Middle and Information Tier

Use of PHP for DB Connection. Middle and Information Tier. Middle and Information Tier Use of PHP for DB Connection 1 2 Middle and Information Tier PHP: built in library functions for interfacing with the mysql database management system $id = mysqli_connect(string hostname, string username,

More information

PHP APIs. Rapid Learning & Just In Time Support

PHP APIs. Rapid Learning & Just In Time Support PHP APIs Rapid Learning & Just In Time Support CONTENT 1 INTRODUCTION... 3 1.1 Create PHP Application... 4 1.1.1 Create PHP Console Application... 4 1.1.2 Create PHP Web Application... 4 2 DATA BASE...

More information

INSTALLING RACHEL ON SYNOLOGY GIAKONDA IT

INSTALLING RACHEL ON SYNOLOGY GIAKONDA IT INSTALLING RACHEL ON SYNOLOGY GIAKONDA IT To add RACHEL to a Synology server there are a few stages to go through. First we need to ready the server for web use. Then we have to obtain a copy of the RACHEL

More information

TechTip: How to Secure the Web Query Login Page (or Any Other Web-Based Application)

TechTip: How to Secure the Web Query Login Page (or Any Other Web-Based Application) TechTip: How to Secure the Web Query Login Page (or Any Other Web-Based Application) Published Thursday, 05 March 2009 19:00 by MC Press On-line [Reprinted with permission from itechnology Manager, published

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

Classic Apps Editor Best Practices

Classic Apps Editor Best Practices Classic Apps Editor Best Practices Blackboard Web Community Manager Trademark Notice Blackboard, the Blackboard logos, and the unique trade dress of Blackboard are the trademarks, service marks, trade

More information

Microsoft Word Advanced Skills

Microsoft Word Advanced Skills It s all about readability. Making your letter, report, article or whatever, easy and less taxing to read. Who wants to read page after page of boring text the same font, the same size, separated only

More information

Use of PHP for DB Connection. Middle and Information Tier

Use of PHP for DB Connection. Middle and Information Tier Client: UI HTML, JavaScript, CSS, XML Use of PHP for DB Connection Middle Get all books with keyword web programming PHP Format the output, i.e., data returned from the DB SQL DB Query Access/MySQL 1 2

More information

CSCE 548 Building Secure Software SQL Injection Attack

CSCE 548 Building Secure Software SQL Injection Attack CSCE 548 Building Secure Software SQL Injection Attack Professor Lisa Luo Spring 2018 Previous class DirtyCOW is a special type of race condition problem It is related to memory mapping We learned how

More information

Mysqldump Schema Only No Lock

Mysqldump Schema Only No Lock Mysqldump Schema Only No Lock The mysqldump command can also generate output in CSV, other delimited text, or XML If no character set is specified, mysqldump uses utf8. o --no-set-names, also is specified,

More information

But before understanding the Selenium WebDriver concept, we need to know about the Selenium first.

But before understanding the Selenium WebDriver concept, we need to know about the Selenium first. As per the today s scenario, companies not only desire to test software adequately, but they also want to get the work done as quickly and thoroughly as possible. To accomplish this goal, organizations

More information

Multimedia im Netz Online Multimedia Winter semester 2015/16

Multimedia im Netz Online Multimedia Winter semester 2015/16 Multimedia im Netz Online Multimedia Winter semester 2015/16 Tutorial 05 Minor Subject Ludwig-Maximilians-Universität München Online Multimedia WS 2015/16 - Tutorial 05 (NF) - 1 Today s Agenda Discussion

More information

Professional PHP for working with MySQL

Professional PHP for working with MySQL Chapter 19 Professional PHP for working with MySQL PDO (PHP Data Objects) Pros Is included with PHP 5.1 and later and available for 5.0. Provides an object-oriented interface. Provides a consistent interface

More information

TechNote: 5a-WordPress Install - PHP 5-2-x Setup

TechNote: 5a-WordPress Install - PHP 5-2-x Setup TechNote: 5a-WordPress Install - PHP 5-2-x Setup Introduction (1.1): TechNote 5a in the WordPress installation and setup series reviews setting up PHP 5.2.x in an XP SP3 environment using IIS 5.1. Introduction

More information

BI Office. Release Notes 6.40

BI Office. Release Notes 6.40 BI Office Release Notes 6.40 February 6, 2017 A. Overview... 3 B. Installation... 3 C. New Features in 6.40... 4 1. Other Features Added Since 6.30... 4 D. Issues Addressed in 6.40... 6 2. Other Issues

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

Smart Energy & Power Quality Solutions. GridVis introduction. Dok. Nr.:

Smart Energy & Power Quality Solutions. GridVis introduction. Dok. Nr.: GridVis introduction Dok. Nr.: 2.047.006.2 Contents Minimum requirements 4 Software versions - GridVis license model 5 Installation and Activation of the GridVis Desktop Software 6 Installation of the

More information

SO, ARE YOU READY? HERE WE GO:

SO, ARE YOU READY? HERE WE GO: Date: 28/09/2012 Procedure: How To Move WordPress To A New Server Or Host Source: LINK Permalink: LINK Created by: HeelpBook Staff Document Version: 1.0 HOW TO MOVE WORDPRESS TO A NEW SERVER OR HOST It

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

Bitnami MariaDB for Huawei Enterprise Cloud

Bitnami MariaDB for Huawei Enterprise Cloud Bitnami MariaDB for Huawei Enterprise Cloud First steps with the Bitnami MariaDB Stack Welcome to your new Bitnami application running on Huawei Enterprise Cloud! Here are a few questions (and answers!)

More information

Basic Computer Skills: An Overview

Basic Computer Skills: An Overview Basic Computer Skills: An Overview Proficiency in the use of computers and common software packages is essential to completing technical tasks and in communicating results. The basic skills required include:

More information

Log Analyzer Reference

Log Analyzer Reference IceWarp Unified Communications Reference Version 11 Published on 11/25/2013 Contents... 4 Quick Start... 5 Required Steps... 5 Optional Steps... 6 Advanced Configuration... 8 Log Importer... 9 General...

More information

Enterprise Modernization for IBM System z:

Enterprise Modernization for IBM System z: Enterprise Modernization for IBM System z: Transform 3270 green screens to Web UI using Rational Host Access Transformation Services for Multiplatforms Extend a host application to the Web using System

More information

<Insert Picture Here> MySQL Client Side Caching

<Insert Picture Here> MySQL Client Side Caching MySQL Client Side Caching Johannes Schlüter Twitter: @phperror MySQL Engineering Connectors and Client Connectivity # pecl install mysqlnd_qc-beta Gracias por vuestra atención! mysqlnd

More information

CS 2316 Homework 9a GT Pizza Login Due: Wednesday November 6th Out of 100 points. Premise

CS 2316 Homework 9a GT Pizza Login Due: Wednesday November 6th Out of 100 points. Premise CS 2316 Homework 9a GT Pizza Login Due: Wednesday November 6th Out of 100 points Files to submit: 1. HW9.py This is an INDIVIDUAL assignment! Collaboration at a reasonable level will not result in substantially

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

IT Service Delivery and Support Week Three. IT Auditing and Cyber Security Fall 2016 Instructor: Liang Yao

IT Service Delivery and Support Week Three. IT Auditing and Cyber Security Fall 2016 Instructor: Liang Yao IT Service Delivery and Support Week Three IT Auditing and Cyber Security Fall 2016 Instructor: Liang Yao 1 Infrastructure Essentials Computer Hardware Operating Systems (OS) & System Software Applications

More information

SQL. Often times, in order for us to build the most functional website we can, we depend on a database to store information.

SQL. Often times, in order for us to build the most functional website we can, we depend on a database to store information. Often times, in order for us to build the most functional website we can, we depend on a database to store information. If you ve ever used Microsoft Excel or Google Spreadsheets (among others), odds are

More information

MySQL On Crux Part II The GUI Client

MySQL On Crux Part II The GUI Client DATABASE MANAGEMENT USING SQL (CIS 331) MYSL ON CRUX (Part 2) MySQL On Crux Part II The GUI Client MySQL is the Structured Query Language processor that we will be using for this class. MySQL has been

More information

Chapter 1 An introduction to relational databases and SQL

Chapter 1 An introduction to relational databases and SQL Chapter 1 An introduction to relational databases and SQL Murach's MySQL, C1 2015, Mike Murach & Associates, Inc. Slide 1 Objectives Knowledge Identify the three main hardware components of a client/server

More information

Batch Watermark Creator Software

Batch Watermark Creator Software PhotoX Batch Watermark Creator Software PhotoX helps you to add watermark stamp to your photos in a batch. The watermark can be generated from text or from an image. PhotoX also provides other tools likes

More information

Taking Fireworks Template and Applying it to Dreamweaver

Taking Fireworks Template and Applying it to Dreamweaver Taking Fireworks Template and Applying it to Dreamweaver Part 1: Define a New Site in Dreamweaver The first step to creating a site in Dreamweaver CS4 is to Define a New Site. The object is to recreate

More information

6.170 Laboratory in Software Engineering Eclipse Reference for 6.170

6.170 Laboratory in Software Engineering Eclipse Reference for 6.170 6.170 Laboratory in Software Engineering Eclipse Reference for 6.170 Contents: CVS in Eclipse o Setting up CVS in Your Environment o Checkout the Problem Set from CVS o How Do I Add a File to CVS? o Committing

More information

SAS ODBC Driver. Overview: SAS ODBC Driver. What Is ODBC? CHAPTER 1

SAS ODBC Driver. Overview: SAS ODBC Driver. What Is ODBC? CHAPTER 1 1 CHAPTER 1 SAS ODBC Driver Overview: SAS ODBC Driver 1 What Is ODBC? 1 What Is the SAS ODBC Driver? 2 Types of Data Accessed with the SAS ODBC Driver 3 Understanding SAS 4 SAS Data Sets 4 Unicode UTF-8

More information

Data Crow Version 2.0

Data Crow Version 2.0 Data Crow Version 2.0 http://www.datacrow.net Document version: 4.1 Created by: Robert Jan van der Waals Edited by: Paddy Barrett Last Update: 26 January, 2006 1. Content 1. CONTENT... 2 1.1. ABOUT DATA

More information