... PHP driver for MongoDB.
What just happened?
In step 1, we download the ZIP le containing the DLL le php_ mongo.dll for
the PHP- MongoDB driver for PHP 5.2 (for the PHP 5.3 specic version, download ... database.
Chapter 8, Building Locaon-aware Web Applicaons with MongoDBand PHP, uses
PHP, HTML5, JavaScript, and the Geospaal Indexing feature of MongoDB to build a web
applicaon that helps you nd ... durability.
Chapter 10, Easy MongoDB Administraon with RockMongo and phpMoAdmin demonstrates
the use of a couple of PHP- based GUI tools for managing MongoDB server—RockMongo and
phpMoAdmin.
What you...
... Computer for Development
To use your local computer to develop your Web site, you must install a Web
server, PHP, and MySQL. PHPand MySQL are free to downloadand use.
Installing the Web server
After ... PHP software, usually by downloading it from a Web site.
3. Install PHP.
4. Configure your Web server for PHP.
5. Configure PHP.
6. Test PHP.
7. Activate MySQL support in PHP.
06_167779 bk01ch02.qxp ... over to the PHPand MySQL Web sites and sign up for a list or two at
www .php. net/mailing-lists .php and http://lists.mysql.com.
In addition, if you’re developing on your local computer and uploading...
... Installing MongoDBand Ruby
[ 22 ]
Connecting to MongoDB using Mongo
The Mongo client ulity is used to connect to MongoDB database. Considering that this
is a Ruby andMongoDB book, it ... comfortable with Ruby and MongoDB. We
installed Ruby using RVM, learned a lile about rbenv and then installed MongoDB. We saw
how to congure MongoDB, start it, stop it, and nally we played ... config /usr/local /mongodb/ mongod.conf
Sat Sep 10 15:46:31 [initandlisten] MongoDB starting : pid=14914
port=27017 dbpath=/usr/local/var /mongodb 64-bit
Installing MongoDBand Ruby
[ 20 ]
Sat...
... Code 530
Using PHP on the Command Line 531
Next 532
V Building Practical PHPand MySQL
Projects
25 Using PHPand MySQL for Large
Projects 535
Applying Software Engineering to Web
Development 536
Planning ... are a PHP newbie or a veteran in
search of a better desk-side reference, this
one is sure to please!”
—WebDynamic
“The true PHP/ MySQL bible, PHP
and MySQL WebDevelopment by Luke
Welling and Laura ... projects and debugging, and pro-
vides sample projects that demonstrate the power and versatility of PHPand MySQL.
Finally
We hope you enjoy this book and enjoy learning about PHPand MySQL...
... symbol.These symbols (< ?php and ?>) are called PHP tags.They tell
the web server where the PHP code starts and finishes. Any text between the tags is
interpreted as PHP. Any text outside these ... to understand PHP.
This example illustrates the concept of server-side scripting in a nutshell.The PHP
has been interpreted and executed on the web server, as distinct from JavaScript and
other ... define, PHP sets a large number of its own. An easy way to
obtain an overview of them is to run the phpinfo() command:
phpinfo();
This function provides a list of PHP s predefined variables and constants,...
... order,
and how much sales tax is payable on the order.
PHP Crash Course
CHAPTER 1
1
PHP CRASH
COURSE
11
FIGURE 1.1
Bob’s initial order form only records products and quantities.
PHPAND MYSQL WEB DEVELOPMENT
x
Returning ... V Building Practical PHPand MySQL Projects 457
22 Using PHPand MySQL for Large Projects 459
Applying Software Engineering to WebDevelopment 460
Planning and Running a Web Application Project ... your application.
5
PHPAND MYSQL WEB DEVELOPMENT
Dropping a Whole Database 226
Further Reading 226
Next 226
10 Accessing Your MySQL Database from the Web
with PHP 227
How Web Database Architectures...
... Connecting to Web Services with XML and
SOAP 739
The Problem 739
Understanding XML 740
Understanding Web Services 744
SOAP 744
WSDL 745
00 525x fm 1/24/03 2:56 PM Page xxviii
I
Using PHP
1 PHP Crash ... require() and include() 118
Using require() 119
File Name Extensions and require() 120
PHP Tags and require() 120
Using require() for Web Site Templates 120
Using auto_prepend_file and auto_append_file
125
Using ... need to understand PHP.
This illustrates the concept of server-side scripting in a nutshell.The PHP has been
interpreted and executed on the Web server, as distinct from JavaScript and other client-
side...
... are a PHP newbie or a veteran in
search of a better desk-side reference, this
one is sure to please!”
—WebDynamic
“The true PHP/ MySQL bible, PHP
and MySQL WebDevelopment by Luke
Welling and Laura ... that I think the
book PHPand MySQL Web Development
rocks! It’s logically structured, just the right
difficulty level for me (intermediate),
interesting and easy to read, and, of course,
full ... for-
ward, and examples are clear and step by
step. Before I read it, I knew nothing of
PHP and MySQL. After reading it, I have
the confidence and skill to develop any
complicated Web application.”
—Power...
... Using PHP
1 PHP Crash Course 11
2 Storing and Retrieving Data 51
3 Using Arrays 71
4 String Manipulation and Regular Expressions 95
5 Reusing Code and Writing Functions 117
6 Object-Oriented PHP ... Authentication with PHP and
MySQL 293
15 Implementing Secure Transactions with PHP and
MySQL 315
00 525x fm 1/24/03 2:56 PM Page vi
IV Advanced PHP Techniques
16 Interacting with the File System and the ... Your Web Database 169
8 Creating Your Web Database 181
9 Working with Your MySQL Database 203
10 Accessing Your MySQL Database from the Web with
PHP 223
11 Advanced MySQL 241
III E-commerce and...
... require() and include() 118
Using require() 119
File Name Extensions and require() 120
PHP Tags and require() 120
Using require() for Web Site Templates 120
Using auto_prepend_file and auto_append_file
125
Using ... 143
Next 143
6 Object-Oriented PHP 145
Object-Oriented Concepts 145
Classes and Objects 145
Polymorphism 147
Inheritance 147
Creating Classes,Attributes, Operations in PHP 147
Structure of a Class ... Presentation 98
Formatting Strings for Storage: AddSlashes() and
StripSlashes() 101
00 525x fm 1/24/03 2:56 PM Page xi
xiii
Contents
5 Reusing Code and Writing Functions 117
Why Reuse Code? 117
Cost 118
Reliability...
... Accessing Your MySQL Database from the
Web with PHP 223
How Web Database Architectures Work 224
The Basic Steps in Querying a Database from the Web
227
Checking and Filtering Input Data 227
Setting ... 290
Backing Up General Files 291
Backing Up and Restoring Your MySQL
Database 291
Physical Security 291
Next 292
14 Implementing Authentication with PHP and
MySQL 293
Identifying Visitors 293
Implementing ... 232
Putting New Information in the Database 232
Other Useful PHP- MySQL Functions 236
Freeing Up Resources 236
Creating and Deleting Databases 236
Other PHP- Database Interfaces 236
Using a Generic Database...
... Date and Time 379
Getting the Date and Time from PHP 379
Using the date() Function 379
Dealing with Unix Timestamps 381
Using the getdate() Function 382
Validating Dates 382
Converting Between PHP ... Your Own Errors 468
Handling Errors Gracefully 468
Next 471
24 Building User Authentication and
Personalization 473
The Problem 473
Solution Components 474
User Identification and Personalization ... Button 403
Finishing Up 403
Drawing Figures and Graphing Data 404
Other Image Functions 412
Further Reading 412
Next 412
20 Using Session Control in PHP 413
What Session Control Is 413
Basic Session...
... 786
Further Reading 786
VI Appendixes
A Installing PHPand MySQL 789
Running PHP as a CGI Interpreter or Module 790
Installing Apache, PHP, and MySQL Under Unix
790
Binary Installation 790
Source ... 704
Next 704
00 525x fm 1/24/03 2:56 PM Page xxvii
B Web Resources 813
PHP Resources 813
MySQL and SQL Specific Resources 815
Apache Resources 815
Web Development 815
Index 817
00 525x fm 1/24/03 2:56 ... 798
Is PHP Support Working? 799
Is SSL Working? 799
Installing Apache, PHP, and MySQL Under Windows
801
Installing MySQL Under Windows 801
Installing Apache Under Windows 805
Installing PHP for...
... Introduction
WELCOME TO PHP AND
MYSQL W
EB DEVELOPMENT
.Within its pages, you will find
distilled knowledge from our experiences using PHPand MySQL, two of the hottest
Web development tools around.
In ... this book is someone who wants to master PHP and
MySQL for the purpose of building a large or commercial Web site.You might already
be working in another Webdevelopment language; if so, this book ... directly used in your Web site, and
many others can be used with minor modifications.
01 525x intro 1/24/03 3:39 PM Page 1
We appreciate immensely the work done by the PHPand MySQL development
teams.Their...