PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)

Welcome to the companion Web site for the second edition of the book PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide, written by Larry Ullman and published by Peachpit Press. This page is specifically for the book’s second edition, published in June 2005 (ISBN 0-321-33657-7). The first edition was published in May 2003 (ISBN 0-321-18648-6). If you are using the first edition of the book, you should go to that page. The third  edition was published in December 2008 (ISBN 0-321-52599-x). If you are using the third  edition of the book, you should go to that page. The fourth edition of the book will be published in Summer 2011.

Beside the handful of pages dedicated to this edition of this book, there’s plenty of other content on 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.


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. are not available for execution online.
  • These are the scripts for the SECOND 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 (139 KB, last modified 08/26/2009)


CSS File for Chapter 3 (4 KB)
Web page images for Chapter 14 (16 KB)

37 responses to PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)

  1. Thanks so much Mr. Ullman for the book. It is helpful for me.

  2. I’m trying to download the CSS file for Chapter 3 – it doesn’t seem to be available any more? Any chance of it being made available again? Thanks

  3. Sir Larry, I have read many Php Books and gone thorugh Video tutorials, but your book is just awesome. Its just awesome. Enjoyed reading it, thanks very much

  4. I’m currently working through this book, even as I’m writing this up. It’s a bit outdated, but still great for the learning process. It’s concise and educational without being too overbearing. I was curious what book you think I should look into buying next from you. PHP 5 or the third edition to this one? I don’t want to repeat the exact same stuff over again and I’m looking for something that integrates more AJAX. I appreciate your time and your knowledge. Thanks Larry!

    • Hello Daniel,

      Thanks for the nice words on the book and for interest in my other books. I actually just began writing the fourth edition, so I wouldn’t buy the third edition right now. The fourth edition will have an Ajax example or two, I think. I also discuss Ajax in my PHP 5 Advanced book and in my “Building a Web Site with Ajax: Visual QuickProject”. You could look into either of those. Thanks again!

      • I’ll definitely wait for your fourth edition, then, and pick up the PHP5 in the meantime. I like your writing style a lot. Right up there with all of the animal books I’ve read. Thanks again, to you.

  5. Hi Larry, I am glad you have this accompanying website with all of the scrips in your book! having the updated scripts to hand is very helpful, saves allot of time and frustration due to small differences which could leave newbies like me confused. for example early on int he book the Form handler script had me scratching my head as i could not get it working, turns out making a simple change from “$name = stripslashes($name);” to “$name = stripslashes($_POST[‘name’]);” was all i needed, if it was not for this site id have given up early on. Many thanks!

  6. Can I buy a ” Hard Copy ” of your books? I need those books from you as ” Hard Copy ” books, because I have very bad eyes to follow video training online and reading PDF’s on the screen. The screen light is knocking out my eyes. So I was searching on google for recommended books to learn webdesign programming and I landed on your site and read through to people reviews of your books and noticed that they are very positive about books. So I need ” Hard Copy ” of your books. Is this possible to order on your site? I need the books below and perhaps some more.
    1)-PHP and MySQL for Dynamic Web Sites
    2)-PHP 6 and MySQL 5 for Dynamic Web Sites
    3)-I don’t know yet


  7. Hi Larry, I’ve just started learning PHP using the 2nd edition of of your PHP and MySQL for Dynamic Web Sites, I’ve had this book lying around the house for some time now and was just wondering whether the information in the book is still ok to learn from, i.e not outdated? As I’m a noob at this would the PHP for the web forth edition be a better starting place? Thanks

    • Hello Rob. Thanks for the interest in the book. By this point in time, the second edition is somewhat outdated. If you can afford the $20 and are so inclined, I’d recommend getting the newest edition. If money is tight or you’re not sure that PHP/MySQL is for you, you could start working your way through the edition you have and see how it goes for you. If you’ve got no programming experience whatsoever and like a gentler introduction to things, I would recommend the “PHP for the Web” book over the “PHP and MySQL for Dynamic Web Sites”. Thanks again!

      • Thanks Larry, I’ve opted for PHP for the Web and the book is on order! I have some basic programming knowledge from Uni but that was some years ago now, I’m kinda starting from scratch. Look forward to reading the book and I hope it serves me well, I’ll also be asking questions on your forum no doubt!!

  8. I read this book recently, and I was amazed. I am only 15 and I now use a lot of the PHP & MySQL codes I learned, on my website. So much better than boring, hassle full, static pages! Thanks for being a great author!

  9. I am enjoying this book so far.
    # This comment was created by me
    # 5/28/12
    # entered as per advice from you book
    # I date stamp everything now
    Help me, I can’t stop adding Easter Eggs

  10. I cant get scripts to work. Do I need a text editor program to open the scripts I downloaded? why is this site not like the one in your book page xix 2nd edition?

    • The site looks different because the 2nd edition of the book is about 8 years old and my site has changed several times since then (as it should). You do need a text editor or IDE to open the scripts, and you’ll need PHP and a Web server to run them.

  11. Hi Larry, Would like to open with “Thank you” :) I have been teaching myself php and mysql over the last few years, being a full time single mum it’s a case of as and when I get the time to sit read, put into practise and learn. So although I’m getting there slowly not as fast as I’d like. But I digress, have to say your books ( and I have a few) out of all the books I have purchased over the years, have been by far the most all rounded and written in such a way that it makes it easier to take in and understand. My only wish would be that you would consider in a future edition you might consider going into more depth on the subject of form validation. It’s funny the site I have been building (a kind of learn as I build site) the one area I seem to find the least info on either on the internet or in the books I have purchased is form validation. Most books will tend to cover this in one very brief chapter. And don’t seem to go into any sort of depth by giving a couple of different examples. Sigh.. I still haven’t been able to find a decent validation for a contact us form! And I have been looking for almost a month.. Any way it would be wonderful if you might take this into consideration for any future book projects. For I know I’m not alone in wishing that more writers included a more in depth coverage of this topic. Whilst googling it I was astounded at the amount of people looking for a well written validation script.

    • Hello Oraya. Thanks for the nice words on my work. Being a single mom and all, I can only imagine how hard you have to work. Thanks, too, for the suggestions. Will see what I can do. Cheers!

  12. This is the only programming book I still have and USE after 8 years.

  13. php 5 & sql 4.1 mwhaha 600 pages of knowledge. ur really nice man ;) finally i found a good book… let the show begin :D

    • Thanks Larry even though I am a french guy I do understand your book better than the french tutorial book on php n mysql since i still using the same book for 2 years now; i do not have the third edition but i hope the change are not much!! Merci beaucoup

      • Thanks for the nice words. Just so you know, the most current edition (as of 2012) is the FOURTH edition. And a fair amount has changed since the second edition.

  14. Thanks Larry,i tried to use the code for the image in chapter 14 and 17 for the ecommerce application but unfortunately is not working and since i am using the old version(mysql qnd mysqli) i have issues with $dbc and all the mysqli functions i changed those as you suggested some parts are working properly but others no at all and the image can’t be displayed in the cart…they gave MIME type error and other…My project is to create a form whereby i can enter customer’s details,upload their pictures as well as be able to see their informations and pictures on the form!

    Have a good day!

  15. this book teach me very well

Trackbacks and Pingbacks:

  1. Learning PHP - Part 1: Getting Started | Mokembo - June 6, 2011

    […] a book on the two technologies sitting around for some time. So I've been working my way through PHP and MySQL for Dynamic Web Sites (2nd Edition) by Larry Ullman. So far, in my humble opnion, it's an excellent book. I'm finding it […]

  2. What Happened? Formerly "Learning PHP - Part 4" | Michael Ramsey - The Website! - July 5, 2012

    […] talked about some of the basics covered at the start of PHP and MySQL for Dynamic Web Sites it's about time to move on to the actual exercises. Starting out involved covering the creation of […]

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