1 an introduction to dreamweaver and php. 2 goals our goals are to become familiar with the...

82
1 An Introduction to Dreamweaver and PHP

Upload: aubrie-reed

Post on 26-Dec-2015

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

1

An Introduction to Dreamweaver and PHP

Page 2: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

2

GoalsOur goals are

•To become familiar with the Dreamweaver environment

•To introduce some basic HTML

•To introduce some simple PHP

•To compare simple PHP (server-side) code with simple JavaScript (client-side) code

We will do so by designing a page that looks like the following.

Page 3: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

3

Possible Preliminary step 1: After a fresh install, Dreamweaver may ask if you want to work in the Designer or Coder version of its environment.

Page 4: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

4

You can change your workspace preference by going to Edit/Preferences on the menubar and clicking on the Change Workspace button

Page 5: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

5

Use the radiobutton to choose the desired

workspace preference. Click OK and OK.

Page 6: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

6

Designer View:

Page 7: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

7

Possible Preliminary Step 2: After a fresh install, Dreamweaver may ask you for a serial number.

Page 8: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

8

Starting the page: Next you can choose whether to open an existing page or create a new one. When creating a new page, you must select the type of page.

Page 9: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

9

PHP versus HTML: The php extension

• PHP code is embedded within HTML code.

• However, a page with PHP code must have the php extension and not the htm or html extension. – Because the PHP is embedded within HTML,

we will still often refer to the file as an HTML document.

• Why the php extension?

Page 10: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

10

Why the php extension?: A note about clients and servers• There are two main actors involved in viewing

a webpage. 1. The viewer’s computer acts as a client. When

surfing or navigating to a page, the client machine requests a page be sent.

2. With the webpage is associated a web server, which handles the request and delivers a response (the page) to the client.

• The php extension informs the server that it must do more than just send the file. Moreover, there must be an associated PHP server to perform this extra work.

Page 11: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

11

Result of starting: The Code view of the new page.

Though we are making a php file, thus far we have a simple HTML file.

Page 12: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

12

HTML

• HTML stands for Hypertext Markup Language. – Hypertext refers to the presence of links in a

page. The links allow a viewer to move directly to another document that may have a different location.

– Markup Language refers to a coding system that indicates how a document is structured or how it should be rendered (using ordinary printable characters rather than special control characters).

Page 13: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

13

HTML Tags

• To distinguish between text and the marking up thereof, HTML uses tags.

• HTML tags are keywords placed within angle brackets <>.

• Many HTML tags work in pairs. There is an opening tag and a closing tag which impose their effect on the hypertext enclosed between them. – The closing tag has the same keyword as the opening

tag but the keyword is preceded by a slash.

Page 14: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

14

• The example above shows some HTML tag pairs. – The <html> and </html> pair surround the HTML document.

– The <head> and </head> pair enclose some explanatory information regarding the document.

– The <title> and </title> pair contain the document’s title.

– The <body> and </body> pair house the information that is to be rendered on the page.

• Note the hierarchical structure of tag pairs within tag pairs (also called nesting).

Page 15: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

15

To change the page’s title, edit either textbox on the

document toolbar or the text between the <title> tags.

Page 16: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

16

To add a comment, place the cursor where you want the

comment and go to Insert/Comment on the menubar.

A traditional comment has no effect on either the structure or rendering of the document. It is seen only when the code is viewed and is used to describe the page or some feature thereof.

Page 17: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

17

The comment is placed between the <!-- and the -->.

Page 18: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

18

To change some of the page’s features such as the font or the

background, go to Modify/Page Properties on the menubar.

Page 19: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

19

The resulting dialog box allows one to set various properties.

Page 20: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

20

E.g. use the dropdown list to make a choice of font family.

Page 21: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

21

Click on the palette button next to Text color to choose a font color.

Page 22: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

22

Color Codes

• One could also enter the color code for one’s choice in the corresponding textbox.

• In HTML color codes use the RGB scheme in which one determines the amount of red, green and blue that will be combined to make the color by choosing three numbers each between 0 and 255.

• The numbers are expressed as hexadecimal numbers (base 16) and concatenated (placed one after another) and preceded by a pound sign #.

Page 23: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

23

La Salle logo blue color code calculation

Here we have used Adobe Photoshop to determine that Red=3, Green=45, and Blue= 87.

Page 24: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

24

La Salle logo blue color code calculation 2

To convert from decimal numbers to hexadecimal numbers, you can use the calculation under Start/Programs/ Accessories/Calculator. Click on View/Scientific and enter the decimal number to be converted. And the click on the Hex radio button.

The result should have two hexadecimal digits (0-9 or A-F). If the result has only one digit, a “0” should be placed in front of it.

Putting the Red, Green and Blue results together yields

La Salle logo blue: #032D57

La Salle logo yellow: #FFD100

Page 25: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

25

Use the Browse button and the resulting dialog box to locate an image file to use as a background.

Page 26: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

26

Path warning message

Page 27: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

27

Embedded versus referred to

• When one inserts an image in a Word document, the image is embedded into the Word document. As a result if you want someone to view the document, you only need to send one file – the Word document.

• When one inserts an image in an HTML document, the image is referred to by the HTML document. As a result if you want someone to view the document, you must send two files – the HTML document and the image file.

Page 28: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

28

Relative versus Absolute Path• When the HTML document refers to the image

file, it provides a path so that the image file can be located.– A file’s path may be absolute (a complete (full) path

or an explicit, full URL, e.g. http://www.lasalle.edu/index.htm) or relative (a shorter path that starts with the same location as the file doing the referring).

• Image files are generally referred to by a relative address. – The previous warning message occurred because we

had not saved the HTML file. Since the HTML file had no location, a relative address could not be provided for the image file.

Page 29: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

29

Note the address given refers to the computer’s C drive. This address will probably be useless when the file is moved to a web server where it can be viewed by clients.

Page 30: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

30

Style tags

• The new additions were placed in a style tag in the head portion of the document.

• The actual style code was then placed inside a comment within the style tags.

• This approach is used to deal with various versions of browsers. – If the browser understands the style tag, it knows to

look in the comment for the style code. – If the browser does not understand the style tag, then

it will ignore the style code since it is placed in a comment.

Page 31: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

31

Cascading Style Sheet

• If one is making a website consisting of many web pages that will have the same style, then a better approach is to place this style code in a separate file called a cascading style sheet and have all of the individual pages link to it.

• This way we only have to change one file to update the style of all of the pages.

Page 32: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

32

Next use the File/Save As option on the menubar and the resulting dialog box to save the file. Recall it should have a php extension. (Do not have spaces in the file name.)

Page 33: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

33

In this case, Dreamweaver automatically updated the path to a relative path.

Page 34: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

34

One can see what the page will look like in Design view or see code and design simultaneously in Split view.

Page 35: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

35

Use Insert/Table on the menubar and the resulting dialog box to make a table with 4 rows and 2 columns.

Page 36: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

36

Highlight the table and click on the arrow next to Properties at the bottom to expand the Property inspector

Page 37: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

37

Use the Property inspector to alter width,

background color and alignment.

Page 38: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

38

Click in the top cell and drag across to highlight both cells in the top row, then go to Modify/Table/Merge Cells.

Page 39: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

39

Table with merged cells in Design and in Code View (merging is achieved by colspan attribute in code)

Page 40: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

40

Table Tags

• The main tags involved in rendering a table are – The <table> </table> tags, which “delimit the

table” – that is, indicate where the table code begins and ends.

– The <tr> </tr> (table row) tags, which delimit a row within the table.

– The <td> </td> (table data) tags, which delimit a cell within a row.

Page 41: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

41

Webopedia delimiter definition

Page 42: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

42

Tag Attributes

• Note that the merged cells were achieved using the keyword colspan as follows <td colspan="2">&nbsp;</td>

• The above code is an example of a tag with an attribute.

• In the newer (more compliant) rules for HTML code attributes are set using a equal sign and the value in quotation marks.

Page 43: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

43

Place the cursor in the top row, go to Insert/Image on the menubar, and

use the dialog box to locate the La Salle logo image file

Note that the image preview tells one the size of the image.

Page 44: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

44

Logo added to first row

There is a web site navigation convention that the logo is a link to the home page. So let’s do that next.

Page 45: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

45

Right click on the image, go to Make Link on the context sensitive menu, enter La Salle’s homepage in the URL textbox. Click OK.

Page 46: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

46

Code for hyperlinked logo

• The resulting code is<a href="http://www.lasalle.edu"><img src="La-Salle-Logo-2003-540-7406.gif" width="558"

height="144" border="0"></a>

– Where <a> is the anchor tag and its href attribute is set to the destination URL.

– And where <img> is the image tag with its src attribute set to the image file name (a relative path).

• Note that the image tag is not a paired tag. The newer rules for HTML would have you add a space and a slash just before the closing angle bracket > as shown below.

<img src="La-Salle-Logo-2003-540-7406.gif" width="558" height="144" border="0“ />

Page 47: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

47

Aspect Ratio

• If one were to change the image size attributes, width and height, they should be changed proportionately to maintain the image’s aspect ratio.– Both numbers should be multiplied (or

divided) by the same amount. – Alternatively, if one attribute is left

unspecified, then the other will be set to maintain aspect ratio.

Page 48: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

48

Entering Text

• In the remaining rows we will display the date using HTML, PHP and JavaScript.

• In the first column, enter the terms “HTML”, “PHP” and “JavaScript” respectively. – In Design view, place the cursor in the

appropriate cell and type. – Or in Code view, identify the appropriate

<td></td> pair and type code between the tags.

Page 49: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

49

Place the cursor in the second column, second row and go to Insert/Date on the menubar and use the dialog box to select the desired format.

Page 50: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

50

HTML Date Code Version: just text. The file would have to

be updated each day to display the correct date.

Page 51: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

51

With the cursor in the second column of the third row, go to Insert/PHP Object/Code Block on the menubar.

Page 52: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

52

Start typing PHP code print date(‘F j, Y’);Note the word print turned blue – it’s a keyword.

Page 53: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

53

Webopedia keyword definition

Page 54: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

54

Continue typing PHP code print date(‘F j, Y’);

Note that not only does date turn blue to indicate that it is a keyword, but also after typing the opening parenthesis, a tip is displayed to inform you that a string corresponding to the date format is needed. The item in the square brackets is optional.

Page 55: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

55

Finish typing print date(‘F j, Y’);

Note that the format string is in single quotes and that Dreamweaver puts it in another color.

Page 56: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

56

The semicolon delimiter

• A delimiter is some character or set of characters (code) that is used to determine where one thing ends and the next thing begins.

• PHP uses a semicolon to delimit statements. A statement is a small unit of code (an instruction) which has an established effect.

• We inserted a PHP code block – a block is a set of statements. – Here our block will only have one statement.

Page 57: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

57

The functions print and date

• A function is a set of code with a name and a defined action.

• A function may need some information to perform its action – this information is sent by using arguments (data passed to the function).

• The arguments are usually placed in parentheses when the function is being called upon to perform its action. – The format string seen in the date is an argument. – The print function also has an argument (the thing to be printed)

but it uses a different style with its argument simply following it on the line with no parentheses.

Page 58: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

58

Go to Insert/PHP Object/Comment on the menubar

Page 59: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

59

Anything typed between the /* and the */ will correspond to a PHP comment.

This type of comment is known as a C-style multi-line comment because this was the way to designate a comment in the C programming language.

Another style is to use two slashes // and anything following the two slashes on the same line is a comment.

Page 60: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

60

Dreamweaver uses yet another color for comments.

Page 61: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

61

The PHP icon

Note that in Design, Dreamweaver inserts a PHP icon to indicate that there is PHP code in this portion of the page. This icon will not be seen by the viewer of the page.

Page 62: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

62

Place the cursor in the 4th row, 2nd column, go to Insert/Tag. Choose

HTML Tags and script in the dialog box. Click Insert.

Page 63: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

63

Use the drop-down list to choose JavaScript as the language and text/javascript as the type. Click OK and then Close the previous

dialog box.

Page 64: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

64

Result: <script> </script> in which one places the JavaScript code

Page 65: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

65

Enter the JavaScript code seen below for writing the date

Page 66: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

66

Using Dreamweaver to transfer documents to web server

• The document must be sent to a machine that is both a web server and a php server.

• A standard way to move files around on the Internet is to use FTP (File Transfer Protocol).

• This can be done using a browser or an FTP client (such as WS_FTP) or within Dreamweaver.

Page 67: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

67

Go to Site/Manage Sites …, click on the New … button and click on Site from the list

Page 68: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

68

Give the site a name and click Next. Then click the Yes radio button,

choose PHP MySQL from the drop-down list and click Next.

Page 69: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

69

Select the Edit locally, then upload radio button. Then click on the

folder icon and choose a (local) folder for the site.

Page 70: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

70

Page 71: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

71

Fill in the information regarding the FTP connection.

Username and password should be same as logon to the Explorer domain

(password first 5 soc. sec., an underscore, and the first three letters of your username)

Page 72: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

72

Click the Test Connection button

Page 73: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

73

Enter the URL of the root and click on Test URL.

Page 74: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

74

Check-in and check-out is used to manage a site with multiple authors. We’ll skip this feature here. Review information and click Done.

Page 75: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

75

Click Done on the Manage Sites dialog box.

Page 76: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

76

Now under the files tab, you can view the site (either local or remote). Or click on the Expand/Collapse button to see both.

The Expand/Collapse button

Page 77: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

77

Click on the Connects remote host button. (May need to click on + to expand folders.)

Page 78: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

78

Use the Put files button to upload the files to the remote site. Click OK on dialog box.

Page 79: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

79

Click on the Expand/Collapse button.

Page 80: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

80

View the remote file in a browser. Click on

View/Source to see the code.

Page 81: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

81

Code the results from View/Source in browser.

Note that we see no PHP code here. Before the web server responded with the file, the PHP server executed the PHP code (on the server side) which printed the date. It is this edited file that was sent by the web server to the client.

Page 82: 1 An Introduction to Dreamweaver and PHP. 2 Goals Our goals are To become familiar with the Dreamweaver environment To introduce some basic HTML To introduce

82

References

• PHP for the World Wide Web, 2nd edition, Larry Ullman, Peachpit Press, 2004.

• http://www.webopedia.com