lecture26

lecture26 - PIC 40A Lecture 26: PHP Form Handling How does...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
PIC 40A Lecture 26: PHP Form Handling
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
How does a browser communicate with a program on a server? Answer: By submitting an HTTP request to the server (possibly via an XHTML form). The HTTP request specifies URI of a resource on the server eg the URL of a PHP script (possibly with encoded arguments). Such a request is made by a certain method. Each HTTP request method is different .
Background image of page 2
The HTTP Request Methods •H E A D – requests document information (a server's response header) without actually fetching the document •G E T –Mos t common – For simple document requests and small forms submission •P O S T
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
HTTP method GET • browsers can pass parameters to a server script by attaching a query string to the URL of the script • a form can send data this way, but you do not need a form to use this method. • the URL of the script combined with the query string make up the request URI which identifies a data resource on the server
Background image of page 4
Query Strings URIs (Uniform Resource Identifiers) can encode – information submitted by a form – database queries (requests for information) in the form of query strings . Example of a
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 16

lecture26 - PIC 40A Lecture 26: PHP Form Handling How does...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online