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)








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
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
Hey, I also had that problem, but I found it in one of the free templates on sixshootermedia. Here I put it in a PasteBin for you. pastebin.com/7eHsSa6c just copy the code and save it as 1.css
Good Luck with the rest of the Book
Thank you Dorian,
I copied your code out and created the file and it greatly improved how the web page looks.
Thanks again.
Larin
Excellent work, Dorian, and thanks for helping out! I’ve added the file to the downloads. Sorry for missing that originally!
Just saved me a few minutes too, thanks!
Sorry about that! My mistake. I’ve added the CSS file to the downloads.
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!
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!
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!
Thanks, Lou!
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.
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).
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
Thank you very much, Rhea. Very nice of you to say!
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!
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 .
Thanks for saying so. I’m glad you like it and I appreciate you letting me know. Larry
Larry,
The code was corrupted. I can’t unzip it. Please help.
Larry you are the best. you teach me a lot on your book. good author
Thanks!
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…
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.
http://www.larryullman.com/books/php-6-and-mysql-5-for-dynamic-web-sites-visual-quickpro-guide-3rd-edition/
Hello, I’ve tried to download the scripts an am getting a corrupted message also. Any suggestions? Thanks
Sorry about that Roxanne. What OS are you using?
Larry,
Roxanne again. I am using Windows 7 Home Premium. thanks
Okay. I just re-archived them and uploaded them again. Hopefully those will work for you. Sorry for the inconvenience.
You might want to update the README.txt, it mentions the old forum URL.
Will do. Thanks for pointing that out!
thanks Larry your books is verry usefull for me and for all
Thank you very much. Very nice of you to say.
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?
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.
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.
Thanks, Abhishek!
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!
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.
Thanks, Abhishek! Very nice of you to say. Thanks for the continued interest in my books!
The best book for PHP that I have ever read !
Thank You
Thanks! Very, very kind of you to say!
I agree! It’s straight forward with helpful workable examples.
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.
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
Chapter 8-9
Thanks for sharing that!
Thanks for writing this awesome book! I’m going to buy the other one “Dynamic Websites”. Your book is the official PHP manual for me. I can’t understand the http://php.net/manual/en/index.php jargon, and I don’t have time for http://www.headfirstlabs.com/books/hfphp/ . Not only do you get straight to the point but it’s impossible to misunderstand anything. Thanks again!
Thank you very much. Very nice of you to say!
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.
Okay. If you need help, then please post a message in the forum, including all the relevant details.
Disregard my question. I found it.
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..!!!
Thanks for the nice words and for the interest in my books. In the PHP & MySQL book, I use MySQLi.
I am almost finished with this book. It’s been a great read, very understandable and easy to follow. Thank you!
Thanks, Linnea!