Skip to main content

Beginning PHP5

Beginning PHP5

Dave W. Mercer, Allan Kent, Steven D. Nowicki, David Mercer, Dan Squier, Wankyu Choi, Heow Eide-Goodman (With), Ed Lecky-Thompson (With), Clark Morgan (With)

ISBN: 978-0-764-55783-5

Jul 2004

888 pages

In Stock

$44.99

Description

What is this book about?

Beginning PHP5 is a complete tutorial in PHP5's language features and functionality, beginning with the basics and building up to the design and construction of complex data-driven Web sites. Fully functioning applications are developed through the course of the book. Other features of the book include installation guide and troubleshooting tips, introduction to relational databases, practical working examples and applications, and a detailed language reference.

Here are the new topics in this edition:

  • OOP
  • PEAR
  • GTK
  • MSI
  • CLI
  • SQLite
  • Error handling with try/catch

Related Resources

Instructor

Contact your Rep for all inquiries

Introduction.

Chapter 1: Getting Up and Running.

Chapter 2: Writing Simple Programs.

Chapter 3: PHP, HTML, and State.

Chapter 4: Decisions, Loops, and Arrays.

Chapter 5: Robust and Healthy Code.

Chapter 6: Writing High-Quality Code.

Chapter 7: Files and Directories.

Chapter 8: XML.

Chapter 9: An Introduction to Databases and SQL.

Chapter 10: Retrieving Data from MySQL Using PHP.

Chapter 11: Using PHP to Manipulate Data in MySQL.

Chapter 12: An Introduction to Object-Oriented Programming.

Chapter 13: Working with UML and Classes.

Chapter 14: PEAR.

Chapter 15: PHP5 and E-Mail.

Chapter 16: Generating Graphics.

Chapter 17: Case Study: A PHP Logging Agent.

Appendix A: Answers.

Appendix B: PHP Functions Reference.

Appendix C: Using SQLite.

Appendix D: ODBC.

Appendix E: PHP CLI.

Appendix F: Configuring PHP5.

Index.

Code in .rar formatDownload
Download Errata Code FilesDownload
Download Appendix A :: AnswersDownload
Code in .zip formatDownload
</tr> <tr> <td width= 57% ><font face= Arial, Helvetica, sans-serif size= -1 >Get a random number - Using rand()</font></td>


The first error on page 56 can be confirmed by the downloadable source code and the second error can be confirmed by Figure 2-3 on page 57. </tr> <tr> <td width= 57% ><font face= Arial, Helvetica, sans-serif size= -1 >Get the square root - Using sqrt()</font></td>
ChapterPageDetailsDatePrint Run
Errata Download,The content for this title has been posted and may be accessed via http://www.wrox.com/WileyCDA/WroxTitle/productCd-0764557831.html 3/21/06
44Error in Code,In the Converting Data Types in PHP Section, the code reads:
echo The varaivle is now...

It should read:
echo The variable is now...
05/10/2006
49Typo,Using the strops() function :
&qout;a

should be:
&qout;o
05/14/07
55Error in Code,The answer to total2= $first_number *= $second_number should be 600 not 1500.04/10/2008
56Errors in Code,The first error in the code on page 56 is the following:


Code Reads:

/font></td> </tr> <tr> <td width= 57% ><font face= Arial, Helvetica, sans-serif size= -1 >Get the value of PI - Using pi()</font></td>

It should read:
</font></td> </tr> <tr> <td width= 57% ><font face= Arial, Helvetica, sans-serif size= -1 >Get the value of PI - Using pi()</font></td>

The second error in the code on page 56 is the following:


The code reads:

</font></td> </tr> <tr> <td width= 57% ><font face= Arial, Helvetica, sans-serif size= -1 >Get a random vnumber - Using rand()</font></td>
It should read:

</font>
05/10/2006
57Error in Code,The code reads:

/font></td> </tr> <tr> <td width= 57% ><font face= Arial, Helvetica, sans-serif size= -1 >Get the square root - Using sqrt()</font></td>

It should read:

</font>
05/10/2006
69Error in Code,In the Try it Out section, the code in the book reads:

<?php
echo <PRE> ;
print_($GLOBALS);
echo </pre> ;
?>

However, it should read:

<?php
echo <PRE> ;
print_r($GLOBALS);
echo </pre> ;
?>
05/10/2006
133Errors in Text,Line Number 48 reads:
if ($-POST[type_sel] {

should read:
if ($_POST[type_sel] {


AND


Line Number 53 reads:
if ($_POST[size-sel] {

should read:
if ($_POST[size_sel] {
05/02/2006
508Constraint Clauses,This is a minor point regarding the MYSQL listing in chapter 13 for creating new tables associated with the example application. The creation of the entityaddress, entitymail, entityphone, and entityemployee contain CONSTRAINT clauses.

My understanding is that by default MySQL uses the MyISAM storage engine for tables. This storage engine does not support foreign key constaints like the ones specified in the listings.

To get the constraints enforces a table type of innoDB would need to be specified using following syntax:
CREATE TABLE customers (a INT, b CHAR (20), INDEX (a)) ENGINE=InnoDB;
or
CREATE TABLE customers (a INT, b CHAR (20), INDEX (a)) TYPE=InnoDB;

The constraint statement will not cause an error if entered. MySQL will parser the statements, but they will be ignored.
6/1/05