Presentation is loading. Please wait.

Presentation is loading. Please wait.

Creating Databases applications for the Web: week 2 Basic HTML review, forms HW: Identify unique source for asp, php, Open Source, MySql, Access.

Similar presentations


Presentation on theme: "Creating Databases applications for the Web: week 2 Basic HTML review, forms HW: Identify unique source for asp, php, Open Source, MySql, Access."— Presentation transcript:

1 Creating Databases applications for the Web: week 2 Basic HTML review, forms HW: Identify unique source for asp, php, Open Source, MySql, Access

2 Hypertext markup language Interpreted by browser on client The asp or php file is interpreted on the server. These files contain –html and –code that produces html. This is reason you need to know the tags. The asp or php code will be inside special delimiters –REPEAT WARNING: tricky syntax. Much fussing about quotation marks. –more on this later.

3 HTML review Ordinary text plus tags. Tags are singletons or pairs –Newest form of HTML (XHTML) requires singletons to be of form: template for all html files:......

4 HTML example First example Advice Creating an html file requires attention to detail.

5 HTML tags referencing files Images Link (hyperlink, a tag) Continue Form

6 HTML Tables Tables are used frequently to format data. Your server-side code needs to produce the table tags. Tables contain rows, rows contain 'data'. 1 2 3 … …

7 Class work Use NotePad and produce an HTML file using tables to display 3 rows and 2 columns, each row holding an image and text describing the image. There should be a heading in the body. After the table, put in a link.

8 Preview: Forms Forms are set up in one HTML document (that could have been produced by server-side programming). On submission, the data is sent to the file indicated by the action attribute in the tag. This file is almost always a server-side file. This file interprets the form data, may access a database, do calculations, in order to create (dynamically, 'on-the-fly') an HTML document to be sent to the client to be interpreted by the browser.

9 First Name Last Name Choose one New Media Math/Computer science Other LAS Conservatories Continuing education placeholder

10

11 After clicking send Browser goes to the file indicated by the action parameter The URL for this is the following (one long string, not split into multiple lines): file:///X|/ accepts_data.htm?fname=Jeanine&lname=Meyer& category=newmedia

12

13 Second example: file:///X|/accepts_data.htm?fname=J ohn&lname=Smith&category=arts

14 Notes Method=get produces the so-called query string. We can also generate query strings using asp/php OR as direct call (testing) method=post sends data another way (via HTTP headers). Benefit is that less is revealed to user. Think of it also as lack of clutter. ASP code is different for get versus post so you need to know which one. Alternative: action="mailto:emailaddress"

15 Exercise Download an image from the Web (remember file name and location) Create an HTML file with the image: Save as accepts_data.htm Open up NotePad Create HTML document with a form to take in information. Make use of different input forms. Set action=accepts_data.htm Save as formtest.htm Open formtest.htm in Netscape or IE.

16 Storyboard formtest.htm accepts_data.htm

17 sharon accounts sharon.ns.purchase.edu server set up just for us, with ability to –interpret asp (and JavaScript) –interpret php –Access engine –MySQL engine Use file transfer protocol program such as ws-ftp to upload your 'scripts' NOTE: you will not be able to view the asp or php source from your browser.

18 ws-ftp demonstration SAVE THE SHEET OF PAPER!!!!

19 Homework Identify source for one of the technical topics in the course: asp, php, MySql, Access. –Must be unique (not posted yet) –Describe the source—don't just list the URL –Do put in the URL as an HTML a tag (you will need to mark the posting as HTML) Text: read chapters 2 & 3.


Download ppt "Creating Databases applications for the Web: week 2 Basic HTML review, forms HW: Identify unique source for asp, php, Open Source, MySql, Access."

Similar presentations


Ads by Google