HTML and CSS Reference
In-Depth Information
Sending Mail
PHP provides functions for sending email. For example, you could write a PHP script
that automatically notifies an administrator by email when a user registers for a website,
or sends users a password reminder if they request one when they forget their password.
PHP also provides functions that enable your applications to retrieve mail as well as send
it, making it possible to write web-based email clients and other such applications.
Object-Oriented PHP
PHP provides features for object-oriented development if you prefer that style of pro-
gramming. For more information on object-oriented PHP, refer to the manual.
Cookies and Sessions
Cookies are a browser feature that lets websites set values that are stored by your
browser and returned to the server any time you request a page. For example, when users
log in to your site, you can set a cookie on their computers to keep track of who they
are so that you don't have to force them to log in any time they want to see a password-
protected page. You can also use cookies to keep track of when visitors return to your
site after their initial visit. PHP provides full support for cookies. It also provides a facil-
ity called sessions . Sessions enable you to store data between requests to the server. For
example, you could read a user's profile into her session when that user logs into the site,
and then reference it on every page without going back and loading it all over again.
Generally, cookies are used with sessions so that the server can keep track of which
session is associated with a particular user.
File Uploads
In Lesson 11, “Designing Forms,” you learned about file upload fields for forms. PHP
can deal with file uploads, enabling the programmer to access and manipulate them.
With PHP, file uploads are stored to a temporary location on the server, and it's up to the
programmer to decide whether to store them permanently and, if so, where to put them.
Other Application Platforms
PHP is just one of many programming languages that people use to write web applica-
tions. It is the language used to create popular web applications like Drupal, WordPress,
and Expression Engine. It's also the tool used by major web companies like Facebook and
Yahoo! However, other options are available. If you're just diving into web programming,
PHP is probably a good choice, but you might find yourself working on applications
written in another language. Here's a brief overview of the languages you may encounter.
 
 
Search WWH ::




Custom Search