0% found this document useful (0 votes)
31 views

Chapter 19 Eyad-D

The document discusses PHP form processing and business logic. It explains that superglobal arrays like $_GET and $_POST retrieve information sent to servers via HTTP requests. Forms have an action property specifying the PHP file to send data to and a method property of either post or get. When the post method is used, form data is appended to the browser request and can be accessed by scripts on the web server. Functions like die() can terminate script execution and output a string.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Chapter 19 Eyad-D

The document discusses PHP form processing and business logic. It explains that superglobal arrays like $_GET and $_POST retrieve information sent to servers via HTTP requests. Forms have an action property specifying the PHP file to send data to and a method property of either post or get. When the post method is used, form data is appended to the browser request and can be accessed by scripts on the web server. Functions like die() can terminate script execution and output a string.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

PHP

Chapter 19: PHP


By: Eyad Alshareef

Eyad Alshareef

Eyad Alshareef

19.8 Form Processing and Business Logic

Superglobal arrays are associative arrays


predefined by PHP that hold variables acquired
from user input, the environment or the web
server and are accessible in any variable
scope.
The arrays $_GET and $_POST retrieve
information sent to the server by HTTP get
and post requests, respectively.
Eyad Alshareef

Eyad Alshareef

Form processing

action property
Where to send form data (php file)

method property
Post
Get
Each element has unique name
Eyad Alshareef

19.8.2 Using PHP to Process HTML5 Forms

Using method = "post" appends form data to


the browser request that contains the protocol
and the requested resources URL.
Scripts located on the web servers machine
can access the form data sent as part of the
request.

Eyad Alshareef

19.4 Form Processing and Business Logic


(Cont.)
We escape the normal meaning of a character
in a string by preceding it with the backslash
character (\).
Function die terminates script execution. The
functions optional argument is a string, which
is printed as the script exits.

Eyad Alshareef

Eyad Alshareef

Eyad Alshareef

Eyad Alshareef

Eyad Alshareef

Eyad Alshareef

Eyad Alshareef

You might also like