PHP for the Web: Visual QuickStart Guide (4th Edition)

Welcome to the companion Web pages for the fourth edition of the book PHP for the Web: Visual QuickStart Guide, written by Larry Ullman and published by Peachpit Press. This page is specifically for the book’s fourth edition, published in March 2011 (ISBN 0-321-73345-2). The first edition was published in April 2001 (ISBN 0-201-72787-0). If you are using the first edition of the book, you should go to that page. The second edition was published in February 2004 (ISBN 0-321-24565-2). If you are using the second edition of the book, you should go to that page. The third edition was published in December 2008 (ISBN 0-321-44249-0). If you are using the third edition of the book, you should go to that page.

This is the fourth edition of my first book: a beginner’s guide to the PHP programming language. This book was written for the average computer user wanting to begin developing dynamic Web sites. No prior programming experience is assumed, although you should already be familiar with the basics of HTML. The focus of the book is the PHP language itself, but two chapters introduce MySQL and SQL, in order to start using a database backend.

With the fourth edition of the book, I started by fixing any minor problems and updating the code for the latest version of PHP. New in this edition is a “Review and Pursue” section at the end of
each chapter. The review prompts revisit the chapter’s key points. The pursue prompts are specific recommendations for how to apply what you just learned on your own. As with any of the book’s material, you can turn to the book’s supporting forum for help or feedback on the “Review and Pursue” section.

Also new in this edition is an added chapter, called “Putting It All Together.” The chapter demonstrates how to use everything covered in the book to assemble a mini-Web application, with authentication and full CRUD (Create, Retrieve, Update, and Delete) functionality.

I thank you for your interest in my work. If you do decide to purchase the book, I hope it meets your expectations.

Beside the couple of pages dedicated to this edition of this book, there’s plenty of other content on LarryUllman.com that you might be interested in. Use the “Post Categories” links above to browse by general topic.

You can download the code for the book using the link below. If you have any questions or problems, I’d recommend using the book’s corresponding support forum, where you’ll get the fastest answer.

Downloads

Every script in the text is available here to be downloaded. Some things you should know:

  • Although these scripts are named or numbered as they are in the book, they do include any updates and changes as warranted by errors that were found after publication. Thus, if you are having problems with a particular script, download the most current version here or check the errata section.
  • The URLs as referenced in the book (e.g. http://www.DMCinsights.com/php/hello.php) are not available for execution online.
  • These are the scripts for the FOURTH EDITION of the book. If you are using a different edition, click the appropriate link above to find the correct page.
  • These scripts have been formatted with line breaks that will work on most systems running most text editors. If you have difficulty opening a script, try:
    • adjusting the way your text editor treats text files
    • using a different text editor, if possible
    • posting a message to the online forum, asking for help

Complete Set of Scripts

phpvqs4_scripts.zip (86 KB, last modified 03/03/2012)

76 responses to PHP for the Web: Visual QuickStart Guide (4th Edition)

  1. Larry,

    I’m a 30+ year COBOL mainframframe programmer who works in a Microsoft shop (.Net, C#, MS Visual Development, etc). However, I’m trying broaden my horizons so I’m trying to learn PHP programming at home. Your book will enable me in my quest. Regaedless of my winning or not, I enjoy reading your newsletter.

    Sincerely, Tim

    • Hello Tim,

      Thanks for the interest in the book and for the nice words on the newsletter. With your experience, I expect you’ll have no problems picking up PHP.

      Cheers,
      Larry

  2. I am reading the book and working through the examples. In chapter 8 the script 8.1 wants you to add a link to the CSS file called 1.css. In the book it then states that you will need to download the CSS file from the book’s corresonding Web site. I went the the website for the 4th edition of the book and downloaded the file phpvqs4_scripts.zip. I then unzipped the file and looked at chapte 8 for the CSS file. There is no CSS file included. Is the file not part of the download or where can I go to get it. I am going ahead and doing the examples but the page does not look right without the CSS file.

    Thanks
    Larin

  3. Nice new edition, Larry. I have the 3rd edition and read a few chapters from this new one at the store. The Review and Pursue section adds a nice review of the main points, and Chapter 13 is a worthwhile example. I’m going to buy the new book online eventually. Until then, I’m going to read it at the store.

    I noticed an error in Chapter 12. In one of the examples you use the new method of server request type to check if the form is submitted. On the next page when you add something to the script, you revert back to the old way (hidden input checking for submitted).

    Keep up the good work.

    • Thanks for the nice words, Lou. Much appreciated! I’m hoping people like the “Review and Pursue” sections. Thank, too, for pointing out that oversight in Script 12.6. I’ll get that added to the errata. Cheers!

  4. I am a student at Red Rocks Community College in Colorado. I have been stuck in my php class with the database(MySQL), One of the instructors had your book, but never got around to looking at it and gave it to me in the hopes of helping me with my project. I started reading your book and everything started falling in place for me especially the database issues. I showed her the book and now she is ordering more to review for next semester. Thanks for the unexpected help Larry..

    • Hello Ron,

      Thank you very much for the nice words on the book and for recommending it to your instructor. I’m glad that it worked for you and very happy to hear that it may be used for the class. You rule!

  5. Forgot to mention… nice picture on the back of the book too. The new cover format of the quick guides has a picture of the author on back. Congrats Larry!

  6. hi Larry, all of the file name in chapter 9 download code are incorrect…
    kindly correct it:-
    script_09_01.php => customize.php
    script_09_02.php => view_settings.php
    script_09_03.php => customize.php
    script_09_04.php => reset.php
    script_09_06.php => login.php
    script_09_06.php => welcome.php
    script_09_06.php => logout.php

    Rahul Bamotra
    rahul1bamotra@gmail.com

    • As you’re in India (based upon your IP address), I’m going to assume you don’t have access to the 4th edition of this book (which just came out in the US), and therefore the reason you think the file names are wrong is because you’ve downloaded the code for the wrong edition. If you are, in fact, using the 4th edition, then I must be missing something, because the downloads linked above match what’s in the book as far as I can tell.

  7. page 41 has an error, the _ (underscore) should be inside the quotation marks. I think it was page 41…

    • Thanks, Lou for pointing that out. I’ll add it to the errata page (and if you could post any future things you catch on that page, too, I’d appreciate it).

  8. Rhea Barbarona April 22, 2011 at 7:37 pm

    Hi Larry,

    This is my first time with PHP and I’m so grateful having you as the author of this book. You really write in a very down-to-earth style which newbies like me really enjoy. Now, I’m no longer frustrated as what I felt with other books I’ve read.

    Cheers,
    Rhea

  9. Quick question: Will book show us how to use a MVC model for a project or does one always have to use a framework like CakePHP for this?

    • Thanks for your question. No, the book does not use MVC at all. It teaches the fundamentals of procedural programming with PHP. One doesn’t always have to use a framework to do MVC, though. My “Effortless E-Commerce with PHP and MySQL” book does have an MVC demonstration, but it assumes existing knowledge of PHP and MySQL. Thanks again!

  10. Hi Larry i got an ebook of your “PHP 6 MYSQL 5″ since 2008. i found it very interesting that a bought the book . i really appreciate the down-to-earth style like Barbo says. Just One Word … wonderful
    From Southest Africa .

  11. Larry,

    The code was corrupted. I can’t unzip it. Please help.

  12. Larry you are the best. you teach me a lot on your book. good author

  13. Matthias Van Halst September 30, 2011 at 12:57 pm

    I wanted to learn php about 10 years ago and went to the bookshop. Lots of book there, but almost everyone had what I call “the computer geek bug” : first chapter is way too easy (plug your computer and turn it on) and suddenly, it becomes impossible to understand for any human being who wants to learn something. There was one exception : Larry’s book “PHP pour le World Wide Web” (yes, in french) : going step by step, with a good construction of the chapters, a logical evolution of the difficulties, and at the end, the reader really understands everything and is able to make some great work. I’ve build very popular websites and your book hase given me the bases to do it ! So, thank you…

    Now, I’ve unfortunately a problem : I want to update my knowledge, as php, MySQL and eveything evolved a lot. So, I’m looking for the 4th edition of your book, or another book you wrote and build in the same way, but in french (my technical english is too weak). Too bad I can’t find it :( And every book I look at, I’m thinking “It’s not as well done as Larry Ullmnan’s one…”). If you have tips, they are welcome…

  14. I got a book from you entitled Visual QuickPro Guide, PHP 6 and MySQL 5 For Dynamic Websites. I seem to unable to find the relevant scripts in the book that I bought 2 years ago. I currently just find the space to brave myself to learn PHP.

  15. Hello, I’ve tried to download the scripts an am getting a corrupted message also. Any suggestions? Thanks

  16. Larry,
    Roxanne again. I am using Windows 7 Home Premium. thanks

  17. You might want to update the README.txt, it mentions the old forum URL.

  18. thanks Larry your books is verry usefull for me and for all

  19. Hi!

    Eeeeh… file phpvqs4_scripts.zip has only up to chapter 13…
    And what about the Appendix online of the book, “Installation”?

    Thank you.

    • As suggested in the README file in the downloads, I suspect you’ve downloaded the code for the wrong book. The “PHP for the Web: Visual QuickStart Guide (4th Edition)” book, which you’ve posted this comment under, only has 13 chapters, Appendix A is not online, and is not titled “Installation”, and has no scripts. Perhaps you’re using the “PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)” book instead?

  20. Hi
    Larry Sir,

    I recently order your book PHP FOR THE WEB VISUAL QUICK START GUIDE 4th edition.I just want to become complete PHP developer.So after this book….what book should i choose…..i will give 5 or 6 months to your book…i am currently working in web development company……and i know basic HTML and JAVASCRIPT……..

    • Hello Abhishek. Thanks for the interest in my book. After the “PHP for the Web: Visual QuickStart Guide (4th Edition)”, you could go onto my “PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)”. There is some overlap between the two, but the latter goes into a lot of areas in much greater detail, with many real-world examples.

  21. thanks Larry Sir,

    I was also thinking about thtat.thanks for the suggestion and for writing such a great books…. definately i will go for it.

  22. Abhishek Sharma February 1, 2012 at 1:03 am

    HI Larry Sir,

    I am currently enjoying your book.Php for the web visual quick pro guide 4th edition.and i find it very interesting and useful.i am confused now which book i should prefer for intermediate and advanced php programming.which i prefer…php and mysql for dynamic websites or php advanced…these are your books and you know better…can u please help me out of this?

    • Thanks for the nice words on the book and for the interest in more of my writing. In answer to your question, the “PHP and MySQL for Dynamic Web Sites” is a more intermediate book than this one. There is some overlap, but the examples differ, and the PHP & MySQL book covers a lot more information in a lot more detail. Thanks!

  23. Thanks Larry Sir,

    You are a great teacher.Everything is very clear and easily understandable.I have to say that you are a great teacher and writer.i just ordered your another book php and mysql for dynamic websites 4th edition after your suggestion.Thank you very much sir.

  24. The best book for PHP that I have ever read !
    Thank You :)

  25. I’m doing the Review and Purse questions at the end of Chapter 7. Do you have the answers posted for these questions? It would be very helpful to see if I got them correct or incorrect. Let me know… thanks!

    • Thanks for your question, Sandy. This is an issue of more and more debate, perhaps, but I never created any formal document answering the questions or addressing the prompts. If you have any specific questions or need help with specific ideas, please post a thread in the forum.

  26. The css for the h2 tag was just killing me. It looked horrible like this http://oi43.tinypic.com/d5unt.jpg If you replace it with #content h2 {
    font:bold 26px/24px Arial,Helvetica,sans-serif;
    margin:15px 0;
    border-bottom:1px solid #f6f6f6;
    padding:5px 0;

    }

    it will look ten times better. http://oi43.tinypic.com/1zbz0b8.jpg

    http://pastebin.com/UkCym1b6

  27. I must be a dope because I do not see this issue in any forum and your code was last updated last month. However, in the chapter 11 scripts 3, 6 and 8, I keep getting “Object not found” on the submit. I have the tried putting the files in different locations, renaming, etc.

  28. Disregard my question. I found it.

  29. Just completed the “PHP for the Web: Visual QuickStart Guide (4th Edition)”…and nw m looking forward for the “PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)”… But, i have one question or say doubt, what methods are explained on the database part, i mean Mysqli or PDO one…..??… Just curious ..to know…before buying…
    BDW… I loved your books… cheers..!!!

  30. I am almost finished with this book. It’s been a great read, very understandable and easy to follow. Thank you!

  31. Larry, I’m using your book to teach part of a course here at the University of Cincinnati on server side scripting. Some of your other texts have instructor resources in addition to the code, such as PowerPoints (PPTs). Any chance you might have the PPTs for this book that I could use – quickly? I am creating PPTs on the fly now but it really adds to my workload.

    Thanks,
    Jeff Bosworth
    Assoc. Professor
    University of Cincinnati, Clermont College

  32. Is this book available for download?

  33. I keep getting a syntax error right after I close my php code for script 10.2 – sticky1 and I have no idea why. I’ve typed the code exactly how they have it in the book. What could I be doing wrong?

Trackbacks and Pingbacks:

  1. “PHP for the Web: Visual QuickStart Guide (4th Edition)” Released! – Larry Ullman - March 24, 2011

    […] very pleased to say that the fourth edition of my first book, “PHP for the Web: Visual QuickStart Guide,” is now available. This book was written for the average computer user wanting to begin […]

  2. Interview Posted Online – Larry Ullman - April 4, 2011

    […] E-Commerce with PHP and MySQL” (New Riders). The fourth edition of my “PHP for the Web: Visual QuickStart Guide” just came out in March 2011 (Peachpit Press). I just began writing the fourth edition of my […]

  3. What is Larry Thinking? #42 => Doing What I Do, Part 3 – Larry Ullman - July 4, 2011

    […] there are multiple writing drafts just to get to that point). As with the fourth edition of “PHP for the Web: Visual QuickStart Guide“, I added a “Review and Pursue” section to the end of each chapter. I also […]

  4. Preparation for learning PHP - easiest programming language for a beginner to learn? - SitePoint Forums - August 7, 2011

    […] that, I would like to be able to create web applications of my own. I've been going through Larry Ullman's PHP for the Web book. The book is great and I believe suitable for beginners because it is focused on PHP only, […]

  5. What Is Larry Thinking? #49 => A New Year – Larry Ullman - January 16, 2012

    […] they found my explanation for how to read the PHP manual, presented in Chapter 1 of my “PHP for the Web: Visual QuickStart Guide” book, to be confusing. I think that learning how to read the manual is quite important, but I can […]

  6. Some Popular PHP Frameworks and Tools for Modern PHP Development - May 18, 2014

    […] called Gii. One of the author’s favorite PHP book authors Larry Ullman who authored the PHP for the Visual QuickStart Guide is a fan of this framework, and he even wrote a book on Yii (link […]

Comments are great, but I'd strongly prefer any requests for assistance get made in the support forums. Thanks!