chapter 2

10
Chapter 2 Programming with PHP Part 3

Upload: frances-bowers

Post on 31-Dec-2015

23 views

Category:

Documents


0 download

DESCRIPTION

Chapter 2. Programming with PHP Part 3. handle_form.php. Script 2.5 on page 56 http://cscdb.nku.edu/csc301/frank/ch02/form.html ch02\ handle_form.php. Superglobal Arrays. $_GET, $_POST, $_REQUEST $_SERVER $_ENV $_COOKIE, $_SESSION. Indexed arrays. $student[0] = “Black”; - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Chapter 2

Chapter 2

Programming with PHPPart 3

Page 2: Chapter 2

handle_form.php

• Script 2.5 on page 56• http://csweb.hh.nku.edu/csc301/frank/ch02/f

orm.html• ch02\handle_form.php

Page 3: Chapter 2

Superglobal Arrays

• $_GET, $_POST, $_REQUEST• $_SERVER• $_ENV• $_COOKIE, $_SESSION

Page 4: Chapter 2

Indexed arrays

$student[0] = “Black”;$student[1] = “Brown”;$student[2] = “Green”;$student[3] = “White”;

Page 5: Chapter 2

Indexed arrays

$student[] = “Black”;$student[] = “Brown”;$student[] = “Green”;$student[] = “White”;

Page 6: Chapter 2

Associative Arrays

$states = array (‘IN’ => ‘Indiana’,‘KY’ => ‘Kentucky’,‘OH’ => ‘Ohio’

)

echo $states[‘KY’];

Page 7: Chapter 2

calendar.php

• Script 2.6 on page 59• http://csweb.hh.nku.edu/csc301/frank/ch02/s

cript_02_06/calendar.php• ch02\script_02_06\calendar.php

Page 8: Chapter 2

multi.php

• Script 2.7 on pages 62-63• http://csweb.hh.nku.edu/csc301/frank/ch02/

multi.php• ch02\multi.php

Page 9: Chapter 2

sorting.php

• Script 2.7 on pages 66-67• http://csweb.hh.nku.edu/csc301/frank/ch02/s

orting.php• ch02\sorting.php

Page 10: Chapter 2

calendar.php

• Script 2.9 on pages 71-72• http://csweb.hh.nku.edu/csc301/frank/ch02/c

alendar.php• ch02\calendar.php