In-class examples and more
CIS 180 L
Intro to PHP
Fall 2006
Last modified: Tue Dec 5 22:58:29 PST 2006
Important Note:
This is a selection of files and examples, most of which were
mentioned or used in the class sessions. It may not be a comprehensive
list. Formatting is generally minimal.
- Class session 9, 12-05-06: intro to working with files in PHP
- Class session 8, 11-30-06: intro to PHP and mysql
- Class session 7, 11-28-06: intro to handling dates and times in PHP
- Class session 6, 11-16-06: intro to PHP and sessions
-
lect06_projected.txt
- some random projected notes from class
-
try_hidden1.php ,
a PHP page that demos a hidden parameter;
click
here to start up try_hidden1.php on redwood
-
functionalize1.php ,
a PHP page that demos better organization through functions;
click
here to start up functionalize1.php on redwood
-
try_session1.php ,
a first example using sessions;
click
here to start up try_session1.php on redwood
-
try_trio.php ,
a second example using sessions;
click
here to start up try_trio.php on redwood
- Class session 5, 11-14-06: PHP and databases, part 1:
connecting to an Oracle database
- Class session 4, 11-09-06: PHP and web forms, part 2
-
lect04_projected.txt
- some random projected notes from class
-
try_here_doc.php ,
a PHP page that both creates an initial form and
responds to that form, demo'ing here documents;
click
here to start up try_here_doc.php on redwood
-
another_form2.html , with an example of a reset button;
click
here to start up another_form2.html
-
try_radio1.html ,
a demo of HTML radio buttons;
handled by
ice_cream_survey1.php ; click
here to start up try_radio1.html
-
try_checkbox1.html ,
a demo of HTML checkboxes;
handled by
form_echo.php ; click
here to start up try_checkbox1.html
-
try_select1.html ,
a demo of an HTML drop-down box;
handled by
choc_survey.php ; click
here to start up try_select1.html
-
try_textarea1.html ,
a demo of an HTML text area;
handled by
comments_survey.php ; click
here to start up try_textarea1.html
- post-class bonus example:
try_validate1.html ,
which sets up a form handled by
validate1.php , which uses strlen(), intval(), and
strval() for some simple validation; click
here to start up try_validate1.html
- Class session 3, 11-07-06: PHP and web forms, part 1
-
lect03_projected.txt
- some random projected notes from class
- quick intro to HTML forms
- formy1.html
- an HTML form with 4 submit buttons; click
here to run
- formy2.html
- an HTML form with some textfields; click
here to run
- formy3.html
- an HTML form with some textfields, which work
better when preceded by some text; click
here to run
- formy4.html
- an HTML form with some textfields, which
look better lined up inside a table; click
here to run
-
- use_php.html ,
which has a form (using method="get") handled by
welcome.php ; click
here to start up use_php.html
-
use_php_post.html ,
which has a form (using method="post") handled by
welcome_post.php ; click
here to start up use_php_post.html
-
use_php_post2.html ,
which has a form (using method="post") handled
a bit more interestingly by
welcome_post2.php ; click
here to start up use_php_post2.html
-
another_form.html ,
a form used by
form_echo.php to show how the $_POST array can
be "walked" through to grab all of the submitted form
name=value pairs; click
here to start up another_form.html
-
calling_self.php ,
a PHP page that both creates an initial form and
responds to that form, with the help of
function array_key_exists and $_SERVER[PHP_SELF];
click
here to start up calling_self.php on redwood
- Class session 2, 11-02-06: PHP language basics, continued
- Class session 1, 10-31-06: Intro to PHP, started PHP language
basics
Back to Course Home Page
Please send questions to
st10@humboldt.edu .