University of North Texas
Department of Library and Information Science
Notes & Scripts
Stuff by J Newland
Stuff by Liz Castro
- All examples from HTML book
- Generic script to display forms – demo
- Generic email script source – modified version for class
Scripts by Larry Ullman (PHP book 4th ed. scripts – source)
- Ch 1 Getting Started w/ PHP
- Print plain text – Script 1.3 (test-source)
- Print HTML – Script 1.4 (test-source)
- Print whitespace – Script 1.5 (test-source)
- Commenting – Script 1.6 (test-source)
- Ch 2 Variables in PHP
- print_r Function – Script 2.1 (test-source)
- Commenting variables – Script 2.2 (test-source)
- Variables – Script 2.3 (test-source)
- Quotes – Script 2.4 (test-source)
- Ch 3 HTML Forms & PHP
- Basic form handling – Script 3.4 (test-source)
- Error reporting – Script 3.6 (test-source-error log)
- Using the POST Array – Script 3.7 (test-source)
- Use GET to send data – Script 3.8 (test-source)
- Ch 4 Numbers in PHP
- Using arithmetic expressions – Script 4.2 (test-source)
- Formatting numbers – Script 4.3 (test-source)
- Operator precedence – Script 4.4 (test-source)
- Increment/decrement – Script 4.5 (test-source)
- Random numbers – Script 4.6 (test-source)
- Ch 5 Strings in PHP
- Concatenation – Script 5.2 (test-source)
- Magic quotes – Script 5.3 (test-source – add slashes)
- PHP & HTML – Script 5.4 (test-source)
- URL encoding – Script 5.5 & 5.6 (test-source for handle_post.php – source for thanks.php)
- String replacement – Script 5.7 (test-source for handle_post.php – source for thanks.php)
- Other string stuff – Script 5.8 (test-source for handle_post.php – source for thanks.php)
- Ch 6 Control Structures in PHP
- if statements – Script 6.2 (test-source)
- if-else statements – Script 6.3 (test-source)
- Relational operators – Script 6.4 (test-source)
- Logical operators & nested if’s – Script 6.5 (test-source)
- elseif statements- Script 6.6 (test-source)
- Switch statements – Script 6.7 (test-source)
- for loops – Script 6.8 (test-source)
- Ch 7 Using Arrays in PHP
- Creating an array – Script 7.1 (test-source)
- Adding things to an array – Script 7.2 (test-source)
- Using foreach loops – Script 7.3 (test-source)
- Multidimensional arrays – Script 7.4 (test-source)
- Sorting an array – Script 7.5 (test-source)
- Using implode & explode – Script 7.7 (test-source)
- Creating an array from a form – Script 7.9 (test-source)
- Ch 8 Creating Web Apps & Ch 10 Creating Functions
- Using headers and footers (demo – source: header-index-footer)
- Sticky email form without functions (test-source)
- Sticky email form with functions (test-source)
- Ch 10 Intro to Databases
- Connect to MySQL Database (test – source)
- Source to create the database
- Source to create a table
- Add an entry (test-source)
- View the blog (test-source)
- Source to edit an entry
- Source to delete an entry