- Shopping Bag ( 0 items )
|2||Just the basics please||17|
|3||Making a statement of condition||35|
|4||Loops and arrays||49|
|5||Functions and include files||67|
|6||Strings and pattern matching||81|
|7||File and system operations||97|
|8||HTML forms introduced||129|
|9||General form processing||143|
|10||Sending information by mail and file uploads/downloads||179|
|11||Web server variables||201|
|14||Connecting to mySQL with PHP||297|
|15||Guest book application||363|
|17||Internal shopping cart application||423|
|18||Apache authentication using htaccess||451|
|19||Authentication and PHP||461|
The reason why most people use Linux is for the Web server Apache. You can use other web servers if you prefer, but why should you when it is a great product!
Once you have Apache up and running, the first thing you want to do is create web pages, be it for your own personal use or putting it on the world wide web. Creating web pages requires at least a grasp of HTML tags. You may prefer to use the many shareware products available to create your web pages but it doesn't matter what method you use as long as you are pleased with the end result.
Now the world wide web and Linux have been around for some time. Users now want to create better web sites, not necessary better in the way of graphics but make them dynamic. What does dynamic mean? Being able to respond to a request from a browser, for example, or someone mailing you from your web page, or letting users enter information in your guest books, or holding information on your web server which can be queried -- the list is pretty much endless. To be able to create these types of dynamic web pages, you need a programming language that can create and process these web pages. There are many on the market but some of them have an initial steep learning curve, in other words the language is hard to learn if you are new to programming. All that has changed now because there is a new web programming language called PHP (Hypertext Processor). This language was created specifically for the web, though it can be used for other purposes, to allow users like you and me to create good dynamic web pages, and it's easy to learn.
The aim of this book is to get you up and running using PHP in a quick and easy manner. The full language of PHP is huge but we will not cover all the different tasks you can do with PHP, just the basics. We shall take it one step at a time, gradually building up to put you in a position to understand the concepts of the language and how it handles web processing. Along the way I will explain what we are doing using examples. Here is a list of some of the areas I will cover:
This book will not preach to you the complete language syntax theory, or the internals of the language. I will leave that for you to explore in other books. What this book will teach is how to use the language in simple terms to create really dynamic web pages. We will create simple web pages first and then gradually build up to using forms. We will then move on to how you can interact with databases, notably mySQL, the preferred database of Linux (that's my view only).
The book is aimed mostly at the Linux market, purely because this is where the bulk of the PHP base is. If you want to run PHP on Windows, you can, and the examples I use in this book are relevant to Windows and Linux users. To get the most out of this book you need to know:
Why make the above statement? Well, I will teach you all you need to know as we go along with examples, example and more examples. In fact this book contains mainly working examples with no long boring paragraphs -- after all, you wanted to buy a book tha/ teaches you PHP in a practical and easy way.
When creating scripts in PHP, you will benefit from a little knowledge of HTML, but I will explain the HTML tags as we go along. This book is intended for the absolute beginner who wants to write PHP scripts, but others who have used PHP in a casual manner will also find this book helpful.
For PHP to work you will require a web server to enable PHP to run as a web server side script, a database to store your information, and, of course, a browser to view your executed PHP scripts. All the above are supplied on the CD accompanying this book. They are:
The book covers PHP Version 4.
In Part 1 we will go through what I consider to be the basics of PHP. This includes the following, amongst others:
In Part 2 we will start dealing with forms, this is what dynamic web pages are all about. Topics covered are:
In Part 3 I introduce you to mySQL, the database server. After some examples of how to insert and get information out of the server, we turn to PHP to see how we can connect to mySQL and produce some really dynamic pages with a database as the back-end. The topics covered are:
In Part 4 we look at how you secure Apache using authentication, and at securing individual files as well as directories. We also look at how to integrate PHP with Apache authentication, making your authentication process seamless. The topics covered are: