Summary 1 Gordon Tian CS520/CS596_026. HTTP Browser – Chrome | FireFox XML/HTML/CSS3/JavaScript/REST Web Server – Nginx PHP/Python/Perl/Java/Ruby/Node.js.

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

Introduction to PHP. PHP Origins Rasmus LerdorfRasmus Lerdorf (born Greenland, ed Canada) PHP originally abbreviation for ‘Personal Home Pages’, now ‘PHP.
Tutorial 10 Programming with JavaScript
Introduction to PHP (Part-1) Basharat Mahmood, Department of Computer Science,CIIT,Islamabad, Pakistan. 1.
A Guide to MySQL 3. 2 Objectives Start MySQL and learn how to use the MySQL Reference Manual Create a database Change (activate) a database Create tables.
2012 •••••••••••••••••••••••••••••••••• Summer WorkShop Mostafa Badr
ADVM420- Class #4 Web Design with PHP and MySQL Adding and Listing from a MySQL Database.
Server & Client  Client: Your computer  Server: Powerful & Expensive computer. Requires network access.
Dynamic Web site With PHP and MySQL. MySQL The combination of MySQL database and PHP scripting language is optimum for building dynamic websites. MySQL.
PHP By Dr. Syed Noman Hasany. PHP PHP was originally created by Rasmus Lerdorf in PHP stands for PHP: Hypertext Preprocessor (a recursive acronym).
Introduction to PHP. PHP PHP is the Hypertext Pre-processor –Script language –Embedded into HTML –Runs as Apache module –Can use DB (MySQL, Oracle, Microsoft.
A Guide to SQL, Eighth Edition Chapter Three Creating Tables.

Session 5: Working with MySQL iNET Academy Open Source Web Development.
INTERNET APPLICATION DEVELOPMENT For More visit:
PHP. Why should we learn web programming? No need write socket programming. - You can forget TCP/IP & OSI layers. - Web server handles socket tasks for.
ASP.NET Programming with C# and SQL Server First Edition
Copyright © 2003 Pearson Education, Inc. Slide 8-1 The Web Wizard’s Guide to PHP by David Lash.
INTERNET APPLICATION DEVELOPMENT For More visit:
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
1 Working with MS SQL Server Textbook Chapter 14.
Tutorial 10 Programming with JavaScript
Done by: Hanadi Muhsen1 Tutorial 1.  Learn the history of JavaScript  Create a script element  Write text to a Web page with JavaScript  Understand.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
CSC 2720 Building Web Applications Database and SQL.
SYST Web Technologies SYST Web Technologies Databases & MySQL.
Open Source Software Unit – 3 Presented By Mr. R.Aravindhan.
Introduction to CS520/CS596_026 Lecture Two Gordon Tian Fall 2015.
Variables and ConstantstMyn1 Variables and Constants PHP stands for: ”PHP: Hypertext Preprocessor”, and it is a server-side programming language. Special.
Introduction to PHP Advanced Database System Lab no.1.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting PHP & MySQL.
What is PHP? PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are executed on the server PHP supports.
A Guide to MySQL 3. 2 Introduction  Structured Query Language (SQL): Popular and widely used language for retrieving and manipulating database data Developed.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
Overview of Form and Javascript fundamentals. Brief matching exercise 1. This is the software that allows a user to access and view HTML documents 2.
Server-Side Scripting with PHP ISYS 475. PHP Manual Website
Introduction to PHP.
Creating a simple database This shows you how to set up a database using PHPMyAdmin (installed with WAMP)
1) PHP – Personal Home Page Scripting Language 2) JavaScript.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
Introduction to MySQL Ullman Chapter 4. Introduction MySQL most popular open-source database application Is commonly used with PHP We will learn basics.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 14 Web Database Programming Using PHP.
1 PHP Intro PHP Introduction After this lecture, you should be able to: Know the fundamental concepts of Web Scripting Languages in general, PHP in particular.
Tutorial 10 Programming with JavaScript. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Learn the history of JavaScript.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
Introduction to Database C# MySQL onnect-C-to-MySQL 1.
COM621: Advanced Interactive Web Development Lecture 10 PHP and MySQL.
PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used, free, and efficient alternative.
PHP Basics and Syntax Lesson 3 ITBS2203 E-Commerce for IT.
PHP using MySQL Database for Web Development (part II)
3 A Guide to MySQL.
Introduction to Dynamic Web Programming
Tutorial 10 Programming with JavaScript
PHP / MySQL Introduction
BASIC PHP and MYSQL Edward S. Flores.
PHP Introduction.
PHP.
PHP and Forms.
HYPERTEXT PREPROCESSOR BY : UMA KAKKAR
Tutorial 10 Programming with JavaScript
Intro to PHP.
Tutorial 6 PHP & MySQL Li Xu
CS3220 Web and Internet Programming SQL and MySQL
Tutorial 10: Programming with javascript
PHP an introduction.
CS3220 Web and Internet Programming SQL and MySQL
Hypertext Preprocessor
SEEM 4540 Tutorial 4 Basic PHP based on w3Schools
Presentation transcript:

Summary 1 Gordon Tian CS520/CS596_026

HTTP Browser – Chrome | FireFox XML/HTML/CSS3/JavaScript/REST Web Server – Nginx PHP/Python/Perl/Java/Ruby/Node.js Database – MySQL Cloud – IaaS, PaaS, SaaS TCP/IP - networking URL/Socket/IP4 address Virtualization - VMware

Install Nginx/MySQL/PHP WT-NMP Install Directory: c:\cygwin\home\$USER c:\cygwin Pay attention to directory security settings Start WT-NMP Test it by going to URL localhost or using Chrome/FireFox

Path In start menu, Right click Computer → Properties → Advanced System Settings → Advanced → Environment Variables → System Variables → Path After editing the Path system variable, please run cmd (if you are running, you have to kill it and run a new cmd

Path To confirm you have edited the Path successfully, just type mysql in the Cmd set path

PATH Open Windows Cmd to log into MySQL Set MySQL root password to svuwins using mysql update Add a new user svu and set its password svuwins using HeidiSql Flush Privileges - The FLUSH statement causes the server to reread the grant tables. Without it, the password change remains unnoticed by the server until you restart it.' Add user by: Grant all on *.* to identified by '' SHOW GTRANTS FOR

MacBook MAMP 1. Install MAMP 2. Open Terminal, type cd to go to home directory 3. add/change.bash_profile file by adding: export PATH=/Applications/MAMP/Library/bin:$ PATH 4. Save the file 5 run command..bash_profile

After PATH changes For windows, you have to kill the old cmd terminal and start a new one For Mac users, you run the command..bash_profile In your home directory

Create/Delete database mysql -uroot -p > use mysql; > UPDATE user set password = password(“svuwins”) where user = “root”; > CREATE USER IDENTIFIED BY 'svuwins'; > GRANT ALL ON proj1.* TO > flush privileges; > select user, password, host from user;

MAC cp phpMyAdmin*.zip /Applications/MAMP/htdocs unzip phpMy*.zip Localhost:8888/phpMyAdmin

CRUD CRUD - Create Read Update Delete DO NOT USE SPACES in the names of databse, table, table element, php variables GRANT ALL ON sep29.* to Flush privileges;

Create a table CREATE TABLE `user` ( `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, `fname` varchar(64) NOT NULL, `mname` varchar(64) NULL, `lname` varchar(64) NOT NULL, `studentid` int NOT NULL, ` ` varchar(40) NOT NULL, `password` varchar(20) NOT NULL, `gender` tinyint NOT NULL, `notes` varchar(100) NOT NULL, `registertime` datetime NOT NULL, `lastlogintime` datetime NOT NULL, `registerip` varchar(20) NOT NULL, `lastloginip` varchar(20) NOT NULL, `birthdate` varchar(20) NOT NULL ) ENGINE='InnoDB' COLLATE 'utf8_general_ci';

Create a table CREATE TABLE `department` ( `id` int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, `did` varchar(10) NOT NULL, `department` varchar(30) NOT NULL ) ENGINE='InnoDB';

Insert SQL command INSERT INTO `user` (`fname`, `mname`, `lname`, ` `, `password`, `studentid`, `phone`, `address`, `registertime`, `registerip`, `lastlogintime`, `lastloginip`, `status`) VALUES ('Gordon', '', 'Tian', '', '', '', '', NULL, '', '', '', '', '1');

HTML Tag The tag is used to create an HTML form for user input. The element can contain one or more of the following form elements:

PHP Basics PHP is a recursive acronym for "PHP: Hypertext Preprocessor". PHP is a server side scripting language that is embedded in HTML. It is used to manage dynamic content, databases, session tracking, even build entire e- commerce sites. It is integrated with a number of popular databases, including MySQL, PostgreSQL, Oracle, Sybase, Informix, and Microsoft SQL Server. PHP is pleasingly zippy in its execution, especially when compiled as an Apache module on the Unix side. The MySQL server, once started, executes even very complex queries with huge result sets in record-setting time. PHP supports a large number of major protocols such as POP3, IMAP, and LDAP. PHP4 added support for Java and distributed object architectures (COM and CORBA), making n-tier development a possibility for the first time. PHP is forgiving: PHP language tries to be as forgiving as possible. PHP Syntax is C-Like. PHP is Object Oriented Language When the end of a file is reached, PHP automatically releases all resources.

PHP Tag Canonical PHP tags

PHP Expression/Statement Case sensitive Expressions are combinations of tokens The smallest building blocks of PHP are the indivisible tokens, such as numbers ( ), strings (.two.), variables ($two), constants (TRUE), and the special words that make up the syntax of PHP itself like if, else, while, for and so forth Statements are expressions terminated by semicolon s

PHP Variables All variables in PHP are denoted with a leading dollar sign ($). The value of a variable is the value of its most recent assignment. Variables are assigned with the = operator, with the variable on the left-hand side and the expression to be evaluated on the right. Variables can, but do not need, to be declared before assignment. Variables in PHP do not have intrinsic types - a variable does not know in advance whether it will be used to store a number or a string of characters. Variables used before they are assigned have default values. PHP does a good job of automatically converting types from one to another when necessary. PHP variables are Perl-like.

PHP Data Types Integers − are whole numbers, without a decimal point, like Doubles − are floating-point numbers, like or Booleans − have only two possible values either true or false. NULL − is a special type that only has one value: NULL. Strings − are sequences of characters, like 'PHP supports string operations.' Arrays − are named and indexed collections of other values. Objects − are instances of programmer-defined classes, which can package up both other kinds of values and functions that are specific to the class. Resources − are special variables that hold references to resources external to PHP (such as database connections).