Learn basic PHP in 6 weeks / PDF
Learn basic PHP in 6 weeks / PDF
Table of Contents:
1. Getting started
2. Commenting your code
3. Language Reference
3.1
Types
3.2
Variables
3.3
Constants
3.4
Operators
4. for and while Loop
5. Handling Forms
6. Emails
7. Date and Time functions
8. PHP include function - creating the
Header and Footer
9. How to set up a mysql database
10. How to set up tables in the
interface
11. Cookies and Sessions
12. How to create table through PHP
13. Case study: a CMS (content management
system) or Blog
-------------------------------------------------
Sample of the pdf document :
1.
INTRODUCTION:
PHP
(recursive acronym for "PHP: Hypertext Preprocessor").
PHP
started out as a small open source project that evolved as more and more people
found out how useful it was. Rasmus Lerdorf unleashed the first version of PHP
way back in 1994. Now it has version 4.0.3 with numerous improvements and
refinements over the original release.
PHP
is a server side scripting language that is embedded in HTML. It is used to
manage dynamic content, databases, session tracking, even build entire
e-commerce sites. It is integrated with a number of popular databases,
including MySQL, PostgreSQL, Oracle, Sybase, Informix, and Microsoft SQL
Server.
Common
uses of PHP:
- It performs
system functions, i.e. from files on a system it can create, open, read,
write, and close them.
- It can handle
forms, i.e. gather data from files, save data to a file, thru email you
can send data, return data to the user.
- You can add,
delete, modify elements within your database thru PHP.
- Access cookies
variables and set cookies.
- Using PHP, you
can restrict users to access some pages of your website.
- It can encrypt
data.
Now,
we will walk through a few simple examples so you can have an idea. Keep in
mind that this is just a quick starter.
"Hello,
World!"
To
get a feel for PHP, first start with simple PHP scripts. Since "Hello,
World!" is an essential example, first we will create a friendly little
"Hello, World!" script.
As
mentioned earlier, PHP is embedded in HTML. (You could have a file that contains
almost no HTML, but usually it's a mixture.) That means that in amongst your
normal HTML (or XHTML if you're cutting-edge) you'll have PHP statements like
this:
<body
bgcolor="white">
<strong>How to say "Hello,
World!"</strong>
<?php echo "Hello,
World!";?>
<br>
It
is simple.
</body>
It
is simple. Just an "echo" statement, and that's it. But it does teach
us something about the language. (By the way, if you examine the HTML output,
you'll notice that the PHP code is not present in the file sent from the server
to your Web browser. All of the PHP present in the Web page is processed and
stripped from the page; the only thing returned to the client from the Web
server is pure HTML output.)............
Click here for Download PDF / FREE
Learn basic PHP in 6 weeks / PDF
0 commentaires: