www.it-ebooks.info 01_579665 ffirs.qxd 12/30/04 8:08 PM Page iii Beginning PHP5, Apache, and MySQL® Web Development Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass www.it-ebooks.info 01_579665 ffirs.qxd 12/30/04 8:08 PM Page ii www.it-ebooks.info 01_579665 ffirs.qxd 12/30/04 8:08 PM Page i Beginning PHP5, Apache, and MySQL® Web Development www.it-ebooks.info 01_579665 ffirs.qxd 12/30/04 8:08 PM Page ii www.it-ebooks.info 01_579665 ffirs.qxd 12/30/04 8:08 PM Page iii Beginning PHP5, Apache, and MySQL® Web Development Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass www.it-ebooks.info 01_579665 ffirs.qxd 12/30/04 8:08 PM Page iv Beginning PHP5, Apache, and MySQL® Web Development Published by Wiley Publishing, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2005 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 0-7645-7966-5 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 1B/SQ/QR/QV/IN No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, e-mail: [email protected]. LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR APARTIC- ULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMO- TIONAL MATERIALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERYSITUATION. THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR OTHER PRO- FESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPETENT PROFESSIONALPERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR SHALLBE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS REFERRED TO IN THIS WORK AS ACITATION AND/OR A POTENTIALSOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAYMAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAYHAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ. For general information on our other products and services or to obtain technical support, please contact our Customer Care Department within the U.S. at (800) 762-2974, outside the U.S. at (317) 572-3993 or fax (317) 572-4002. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. Library of Congress Cataloging-in-Publication Data available from the publisher. Trademarks:Wiley, the Wiley Publishing logo, Wrox, the Wrox logo, Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affil- iates, in the United States and other countries, and may not be used without written permission. MySQLis a registered trademark of MySQLAB Limited Company. All other trademarks are the prop- erty of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book. www.it-ebooks.info 01_579665 ffirs.qxd 12/30/04 8:08 PM Page v About the Authors Elizabeth Naramore Elizabeth graduated from Miami University (Ohio) with a degree in Organizational Behavior and has been a Web developer since 1997. Her main focus is in e-commerce, but she develops sites across numer- ous industries. She is currently a moderator at PHPBuilder.com, an online help center for PHP. She lives in Cincinnati, Ohio with her husband and two children, and looks forward to someday returning to Miami to get her Masters in Computer Science. Thanks to my husband and soul mate who continues to be supportive of everything I do, and who inspires me to always do a little better. Thanks to my children who make me understand the importance of looking outside the box and keeping my sense of humor, and for making me proud to be a mom. Also, thank you to Debra for always keeping us on track, and for having faith in us. Jason “goldbug” Gerner Jason currently spends his days working as a Web developer in Cincinnati and burns free time com- plaining about lack of support for Web standards and abusing XML. He can often be found lurking in the PHPBuilder.com discussion forums, waiting to chime in with nagging comments about CSS or code efficiency. Yann “Bunkermaster” Le Scouarnec Yann is the senior developer for Jolt Online Gaming, a British gaming company. He is a moderator at PHPBuilder.com and a developer of open source PHPsoftware for the gaming community. He has also worked for major software corporations as a software quality expert. I thank all the innocent bystanders who got pushed around because of this project: Debra and Nancy, who were patient enough not to have homicidal thoughts; and my wife and kids, who barely saw me for six months. Jeremy “stolzyboy” Stolz Jeremy is a Web Developer at J&M Companies, Inc. (www.jmcompanies.com), a print company in Fargo, North Dakota. Jeremy is primarily a PHP/MySQLdeveloper, but he has also worked with many other languages. When not working, he frequents the Internet and tries to keep his programming skills sharp and up to date. He is a contributor to and moderator at PHPBuilder.com. I’d like to thank my wife, my baby daughter, and the rest of my family for being patient with me while working on this project. www.it-ebooks.info 01_579665 ffirs.qxd 12/30/04 8:08 PM Page vi Michael “BuzzLY” Glass Michael Glass has been a gladiator in the software/Web site development arena for more than eight years. He has more than ten years of commercial programming experience with a wide variety of tech- nologies, including PHP, Java, Lotus Domino, and Vignette StoryServer. He divides his time between computer programming, playing pool in the APA, and running his Web site at www.ultimatespin.com. You can usually find him slinking around on the PHPBuilder.com forums, where he is a moderator with the nickname BuzzLY. Thanks, Staci, for putting up with long and late hours at the computer. Elizabeth and Jason, it wouldn’t have been the same project without you two. And thanks to my code testers at www.ultimatespin.com: Spidon, Kaine, Garmy, Spidermanalf, Ping, Webhead, and FancyDan. You guys rock! To Donna and Gerry, who have influenced my life more than they can ever know, and who taught me the importance of finishing what you’ve started. www.it-ebooks.info 01_579665 ffirs.qxd 12/30/04 8:08 PM Page vii Credits Acquisitions Editor Project Coordinator Debra Williams Cauley Erin Smith Development Editor Graphics and Production Specialists Brian MacDonald Carrie A. Foster Denny Hager Senior Production Editor Jennifer Heleine Angela Smith Quality Control Technician Technical Editor Brian H. Walls Jason Gerner Proofreading and Indexing Copy Editor TECHBOOKS Production Services Kim Cofer Editorial Manager Mary Beth Wakefield Vice President & Executive Group Publisher Richard Swadley Vice President and Publisher Joseph B. Wikert www.it-ebooks.info
Description: