PHP for the World Wide Web: Visual QuickStart Guide

Overview

Unlike those other professional-level books on open-source scripting, PHP for the World Wide Web: Visual QuickStart Guide isn't just for professional programmers--it's written for the rest of us with a passing familiarity with HTML.

This visual, task-based guide gets users up and running with the basics of PHP, starting with basic syntax, testing scripts, working with variables, creating Web applications, and more. Throughout the book, sample scripts and projects show the ...

See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (20) from $1.99   
  • New (1) from $58.77   
  • Used (19) from $1.99   
Close
Sort by
Page 2 of 2
Showing 11 – 19 of 19 (2 pages)
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$3.89
Seller since 2014

Feedback rating:

(7)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

Good
2001 Paperback Good Connecting readers with great books since 1972. Used books may not include companion materials, some shelf wear, may contain highlighting/notes, may not ... include cd-om or access codes. Customer service is our top priority! Read more Show Less

Ships from: San Antonio, TX

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$3.89
Seller since 2014

Feedback rating:

(0)

Condition: Good
2001 Paperback Good Connecting readers with great books since 1972. Used books may not include companion materials, some shelf wear, may contain highlighting/notes, and may not ... include cd-rom or access codes. Customer service is our top priority! Read more Show Less

Ships from: San Antonio, TX

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$4.00
Seller since 2014

Feedback rating:

(11)

Condition: Good
2001 Paperback Good Connecting readers with great books since 1972. Used books may not include companion materials, some shelf wear, may contain highlighting/notes, and may not ... include cd-rom or access codes. Customer service is our top priority! Read more Show Less

Ships from: Cedar Park, TX

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$4.00
Seller since 2005

Feedback rating:

(122)

Condition: Very Good
Berkeley, CA 2001 Trade Paperback Very Good. No Jacket 8vo-over 7?"-9?" tall. xix, 278 pp. First printing. Light rubbing to the cover edges. The binding is tight and square, and ... the text is clean. Read more Show Less

Ships from: Gastonia, NC

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$18.89
Seller since 2014

Feedback rating:

(2)

Condition: Good
29/03/2001 Paperback Used-Good This book has been previously used but is in good, tight condition. The book does not show much wear and is clean with no damage to the pages. ... There may be some slight markings on the cover. Remember, we have a money back guarantee on all our books. *****PLEASE NOTE: This item is shipping from an authorized seller in Europe. In the event that a return is necessary, you will be able to return your item within the US. To learn more about our European sellers and policies see the BookQuest FAQ section***** Read more Show Less

Ships from: Reading, United Kingdom

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
$18.89
Seller since 2014

Feedback rating:

(2)

Condition: Good
29/03/2001 Paperback Used-Good This book has been previously used but is in good, tight condition. The book does not show much wear and is clean with no damage to the pages. ... There may be some slight markings on the cover. Remember, we have a money back guarantee on all our books. *****PLEASE NOTE: This item is shipping from an authorized seller in Europe. In the event that a return is necessary, you will be able to return your item within the US. To learn more about our European sellers and policies see the BookQuest FAQ section***** Read more Show Less

Ships from: Reading, United Kingdom

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
$19.46
Seller since 2009

Feedback rating:

(6)

Condition: Very Good
PAPERBACK Very Good 0201727870 ALL BOOKS SHIPPED WITHIN 1 DAY OF PURCHASE! *****PLEASE NOTE: This item is shipping from an authorized seller in Europe. In the event that a ... return is necessary, you will be able to return your item within the US. To learn more about our European sellers and policies see the BookQuest FAQ section***** Read more Show Less

Ships from: Thetford, United Kingdom

Usually ships in 1-2 business days

  • Canadian
  • Standard, 48 States
  • Standard (AK, HI)
$29.51
Seller since 2015

Feedback rating:

(362)

Condition: Good
Possible retired library copy, some have markings or writing. May or may not include accessories such as CD or access codes.

Ships from: Chatham, NJ

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$29.65
Seller since 2015

Feedback rating:

(362)

Condition: Very Good
Very good.

Ships from: Chatham, NJ

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Page 2 of 2
Showing 11 – 19 of 19 (2 pages)
Close
Sort by
Sending request ...

Overview

Unlike those other professional-level books on open-source scripting, PHP for the World Wide Web: Visual QuickStart Guide isn't just for professional programmers--it's written for the rest of us with a passing familiarity with HTML.

This visual, task-based guide gets users up and running with the basics of PHP, starting with basic syntax, testing scripts, working with variables, creating Web applications, and more. Throughout the book, sample scripts and projects show the reader just what they need to know, and a companion Web site offers every script available for downloading.

Read More Show Less

Editorial Reviews

Booknews
Designed for developers, this guide and reference covers the key concepts of PHP and explains the features of PHP version 4.04. Beginning with a basic overview, it moves on to cover syntax, testing scripts, working with variables, and creating Web applications. Along the way, sample scripts and projects illustrate major points. Ullman is a PHP programmer and Web designer. Annotation c. Book News, Inc., Portland, OR (booknews.com)
Read More Show Less

Product Details

  • ISBN-13: 9780201727876
  • Publisher: Pearson Education
  • Publication date: 3/28/2001
  • Series: Visual QuickStart Guide Series
  • Edition description: Older Edition
  • Edition number: 1
  • Pages: 304
  • Product dimensions: 7.00 (w) x 8.98 (h) x 0.58 (d)

Meet the Author

Larry Ullman is the Director of Digital Media Technologies at DMC Insights, Inc., and also serves as the lead PHP programmer. He specializes in developing dynamic Web sites and Web applications and also teaches PHP through various mediums.
Read More Show Less

Read an Excerpt

1: Getting Started with PHP

Learning any new programming language should always begin with an understanding of the syntax you will use, and that's what we'll explore in this chapter. I will primarily cover the fundamentals, but will also include some recommendations that will improve your work in the long run. Failure to follow the rules of syntax is an all-too-common cause of errors in your code.

By the end of this chapter you will have successfully written and executed your first PHP scripts.

Basic Syntax

In order to create your first PHP page, you will start off exactly as you wo uld if you were creating an HTML document from scratch.

There are two main differences between a standard HTML document and a PHP document. First, PHP scripts should be saved with the .php extension (e.g., index. php). Second, you wrap your PHP code with the <?PHP and ?> tags to indicate what is PHP as opposed to what is HTML.

To create a new PH P script on your computer:

1. Open a text editor such as SimpleText, WordPad, or whichever application you prefer. 2. Choose File > New to create a new, blank document.

3. Type <HTML> <HEAD> <TITLE>First PHP Script</TITLE> </HEAD> <BODY> (Script 1.1). You can put each element or element group on its own line to make it neater.

4. Type <?PHP on its own line.

5. Press Return to create a new line and then type ?>.

6. Type </BODY,</HTML>.

7. Choose File > Save As. In the dialog box that appears, choose Text Only (or ASCII) for the format.

8. Choose the location where you wish to save the script.

9. Save the script as first. php.

Tips
Check with your ISP to learn which file extensions you can use for PHP documents. For this book you will use .php, although you may be able to use .phtml instead. Servers still running PHP version 3 commonly use .php3 as the default extension. A file extension tells the server how to treat the file: file.php will go through the PHP module, file.asp is processed as ASP, and file.htmi is a static HTML document.

You can also check with your ISP to se if short tags (using <? and ?> instead of <?PHP and ?>) or ASP tags (<% and %>) are acceptable. Programs like Macromedia Dreamweaver can work better with PHP pages if you use ASP tags.

Sending Data to the Browser

Now that you have created your first PHP script, it's time to make it actually do something. As discussed in the introduction, PHP tells the server what data to send to your Web browser. For starters, you will use the phpinfo()function to create our data. This function, when called, will send a table of information to the Web browser itemizing the specifics of the PHP installation on that particular server.

To add the phpinfo() function to your script:

1. Open your first. .php script in your text editor, if it isn't already.

2. Put your cursor between the PHP tags (<?PHP and ?>) and create a new line by pressing Return). 3. On the new line, type phpinfo();.

4. Change the title of the page by replacing First with Test in line 3 of the HTML (Script 1.2).

5. Save your script as test. php.

Everv statement within PHP code must end with a semicolon (;). Forgetting to do so is a common cause of errors. You can put multiple statements on one line, with each separated by its own semicolon. For the sake of clarity, however, I would not recommend it.

A statement in PHP is an executable line of code, like print) or phpinfo(). The semicolon concluding these lines are the equivalent of telling PHP to go ahead and execute the command. Conversely; comment lines, the PHP tags, control structures (conditionals, loops, etc.), and certain other constructs I'll discuss in this book do not merit a semicolon. Each of these aspects of PHP do not do anything in and of themselves so much as dictate the circumstances for the statements to follow. That is to say: the PHP tag only indicates that PHP code is to follow; comment characters render text moot, and so forth. Thus, in general, a semicolon concludes a specific action, while no semicolon is required for constructs that create conditions.

Tips
For better or worse, PHP is rather liberal when it comes to case sensitivity of built-in functions like PHPINFO(). PHPinfo() and PHPINFO() will net the same results. Later in the book (for example, Chapter 2; Variables) you will see examples of instances where the word case will make a crucial difference. HTML, in contrast, is entirely case insensitive.

Phpinfo() is an example of a built-in function which comes standard in PHP To learn more about functions and how to create your own, see Chapter 9, Creating Functions.

You will find it handy to have a copy of the test. php file around. You can use this to check the PHP capabilities of a new server or see what features are supported, such as databases, GIF building, etc. You can also use this file to experiment with different extensions and learn which ones the server will process correctly and which it will not.

Testing Your Script

Unlike HTML, which can be tested on your own computer using a Web browser, in order to see what the output of your PHP script will look like, it needs to be saved to a PHP-enabled server. If you are working directly on a server, the script is already there once you've saved it. If you are creating your script using a text editor on your home computer, you will need to use FTP (file transfer protocol) to place it on the server. Your ISP or Web host should provide you with FTP access. You will also need an FTP application such as Fetch (for the Macintosh) or WS FTP (for Windows).

To FTP your script to the server:

1. Open your FTP application.

2. Connect to the server, using the address, username, and password provided to you by your ISP or Web host (Figure 1.1).

3. Find the proper directory for your HTML pages (e.g., www/ or htdocs/).

4. Save your script (test. php) to the server. (As a rule, most FTP applications save transferred pages to the server with the same filename you are using for those files on your computer. If your particular FTP program gives you the option to specify the filename, use test. php....)

Read More Show Less

Table of Contents

Introduction.
What Is PHP?
Why Use PHP?
How PHP Works.
What You'll Need.
About This Book.
PHP: VQS Companion Website.
1: Getting Started With PHP.
Basic Syntax.
Sending Data to the Browser.
Testing Your Script.
Adding Comments to Your Scripts.
Formatting Data Sent to the Browser.
Escaping Data Sent to the Browser.
2: Variables.
What Are Variables?
Variable Syntax.
Types of Variables.
Numbers.
Strings.
Assigning Values to Variables.
3: Receiving Data in the Script.
Creating Forms in HTML.
Using Get or Post Methods.
Getting Data from a Form.
Creating a Link to a Script.
Getting Data from a Link.
Getting Data from Environment Variables.
Inputting Data Manually.
4: Using Numbers.
Integers.
Floating-Point Numbers.
Adding, Subtracting, Multiplying, and Dividing.
Modulus.
Incrementing and Decrementing a Number.
Using Multiple Operators.
5: Using Strings.
Trimming Strings.
Finding the Length of a String.
Pulling out Sub-Strings.
Concatenating Strings.
Encoding and Decoding Strings.
Escaping Strings.
6: Control Structures.
What Is an Array?
Creating an Array.
Adding Elements to an Array.
Deleting Elements from an Array.
Finding the Length of an Array.
Retrieving a Specific Element from an Array.
Sorting Arrays.
Creating a String from an Array.
Creating an Array from a String.
Passing an Array in a URL.
7: Using Arrays
Arithmetic.
Logical.
Bitwise.
Assignment.
Miscellaneous. Comparison.
Precedence.
8: Conditional Statements and Loops.
The If Conditional.
Using Else.
Using Else-If.
The Switch Conditional.
The While Loop.
The for Loop.
Using Break and Exit.
Evaluating Multiple Conditions.
Using Nested Conditional Statements and Nested Loops.
9: Regular Expressions.
What Are Regular Expressions?
Defining a Regular Expression.
Matching.
Ereg versus Eregi.
Matching and Replacing.
Common Uses for Regular Expressions.
10: Creating Functions.
Creating Simple Functions.
Using Simple Functions.
Creating Functions That Take Input.
Calling Functions That Take Input.
Creating Functions That Returns a Value.
Using Functions That Returns a Value.
Variable Scope and the Global Statement.
11: Cookies.
What Are Cookies?
Current Issues Regarding Cookies.
Creating a Cookie.
Determining a Cookie's Expiration Date.
Limiting a Cookie's Scope.
Getting Data from a Cookie.
Deleting a Cookie.
Alternatives to Using Cookies.
12: Files and Directories.
Opening Files.
Reading from Files.
Writing to Files.
Closing Files.
Renaming Files.
Deleting Files.
Handling File Uploads.
Creating Directories.
Opening Directories.
Closing Directories.
Changing the Directory.
13: Creating Web Applications.
PHP and HTML.
Using Include and Require.
Creating Templates.
Using Hidden Fields.
Determining the Date and Time.
Using HTTP Headers.
Sending Email.
14: Databases.
Common Uses for Databases.
PHP Support for Databases.
Sending Data to a Database.
Getting Data from a Database.
Database Resources.
15: Debugging.
Common Errors.
Error Reporting.
Error Handling.
Using Comments and Print Statements to Find Errors.
Following a Variable's Progress.
Using the Die Statement.
Database Errors.
Appendix A: Installation and Configuration.
Platform.
Web Servers.
Modules.
Security.
Configuring.
Other Resources.
Appendix B: Security.
Why Security Is Important.
Cryptography.
Using SSL.
Writing Secure PHP.
Appendix C: PHP Resources.
Suggested PHP Capabilities to Learn.
Websites.
Newsgroups.
PHP Script Resource Libraries.
Books.
Index.
Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 5 Customer Reviews
  • Anonymous

    Posted December 8, 2003

    What?!?!?!

    For those of you who highly recommend this book, I want to know which book you're reading. By chapter 3, I started finding mistakes in the script. I had to reference another website to find the correct script. The same could be said for chapter 4. Plus, when I sent an email to the author to notify him of potential mistakes, I got an autoresponse email stating. 'I'll never see your message.' What kind of support is this!!!! I know that my machine is configured correctly because all other scripts that I have tried are functioning correctly...even the ones pulling information from a database. I am heading back to the store right now to return this book in the hopes that I can find a better one. To the author: Thanks for nothing!

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted September 27, 2003

    Perfect for someone new at PHP

    Larry Ullman's approach to teaching a beginner PHP is excellent. I felt a little lost in some of the first chapters, but the key is to just stick to it. In addition, Mr. Ullman has support boards and a Web site that helps you out along the way - I highly recommend this book!

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted August 6, 2003

    Off to a Good Start

    Larry Ullman has written a lot about php and how to put together an interesting interactive page. This introductory book is still one of his best efforts. If I have any criticism at all, it's that the screenshots are often too small to make out what's really important, and that little attention is paid to modern standards-compliant web development techniques. But Ullman gives a good account of the language and how to use it, here and in the follow-on volume, 'PHP Advanced for the World Wide Web: Visual QuickPro Guide'. Like all of the Visual QuickStart Guides, the approach is very basic at first, adding more and more and building on the previous pages.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted October 24, 2002

    Buy this book.

    Have researched all available beginning/ intermediate PHP and MySQL books, and this one gets down to the basics quickly and effectively - while explaining every step in detail. Provides examples of real-world experiences, and does not have the useless "filler" material found in so many programming books. Have working PHP pages in minutes. And if looking for web hosts, be sure to research unlimited mysql database hosting, there are some for under $100 per year.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted August 15, 2001

    Fast, Easy, Affordable!!

    This book is REALLY good! it gets straight to the point without even waisting time. I got through this whole book in 1 hour and i knew php. I VERY MUCH recommend this book to everyone. It doesn't get you confused and doesn't go into detail about everything, so you don't waiste your time! Buy this book now! What are you wating for?

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 5 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)