Class 8 Notes for Web Publishing II

Topics Covered:

Codecademy has great tutorials on HTML and PHP

Dynamic (Database Generated) Sites or "Creating Webpages on the Fly"

PhpED Editor that is very easy to use but we will be using Dreamweaver or Notepad ++

dynamic pages

Adobe's (Tutorial and Software) or Stanford's Dreamweaver Tutorial or the Tutorial inside Dreamweaver.

 

Amazon.Com and MyYahoo are two examples of Dynamic Web sites that are created on demand by accessing a database and template.

 

 

 

 

We will be using a MySQL database with a table

Dreamweaver CSS

PHP: Pre Hypertext Preprocessor

PHP Declaration  
<?php
echo "PHP Code goes here";
?>
Code block can start anywhere
PHP Variable Declaration  
$txt="I love PHP";

All variables in PHP start with a
$ sign symbol and then must have a letter or an underscore

PHP Echo  
echo "Displaying PHP text"; echo displays on the screen instead of document.write() for Javascript

 


Connect to a MYSql Data base on my server

We will use our standard Student test acount this week and next week we will your access to the database

  1. Using your Site create a PHP page using Dreamweaver.

  2. From the Data Tab, Select Dynamic Table

  3. If your Site is setup correctly, you should be asked to setup a Record Set

 

Record Set Setup

 

Connection Setup

Record Set Setup part 3

 

Configure the page to work with the data you have

 

 

Create a Table with the following Fields:

Table Setup
Field Name Description of Field
PNumber for Part Number limit the field to 20 Text characters
Pname for Product Name limit the field to 50 Text characters
Pdescribe for Product Description limit the field to 250 Text characters
Pgraphic for file name of graphic limit the field to 100 Text characters
Price for Price of product limit the field to 10 Text characters


Fill in at least 4 Records!

 

ASP using Javascript

Follow the directions for Setting up an ASP Javascript Database Connection using Dreamweaver.

 

Terms:

PHP, ASP, MySql, Databases, Fields

Homework:

 

Final Step:

Review in your mind everything we covered in class and remember to cover it again before you go to bed so your mind to process this information while you sleep.