Jump to content
Larry Ullman's Book Forums

Larry

Administrators
  • Posts

    5413
  • Joined

  • Last visited

  • Days Won

    155

Everything posted by Larry

  1. Ugh, yeah, sorry about the confusion on this! Will get it corrected in the book!
  2. When you say "the links do nothing", what do you mean? Do you mean that you click on them and nothing happens? Or you click on them and the popup appears but there's not content in there? Could you also clarify where all the files are located on your file system?
  3. Thanks for the nice words! This is really strange. According to the PHP manual: I looked around and don't see any obvious causes and solutions to this, not even specific to Wampserver. Just to be certain, are you running the script through HTTP?
  4. Thanks! I don't have plans to update the PHP Advanced book right now, which means it wouldn't be updated for quite a while. But, yes, PHP does support using object-oriented and procedural programming intermixed.
  5. Hey Jim, Thanks for the nice words! I really appreciate it. There was an error in the SQL file (from my GitHub downloads) that set the length as too short. Did you use that? Or, put another way, what's the length of the password column you're using?
  6. The @ is the error suppression operator. It's a blunt tool to stop errors from being displayed, but you'll generally only want to use it when the errors are still being handled in some way.
  7. If developing locally, what you really want to do is enable display_errors in your PHP configuration. If not developing locally, you'll want to do this too, but it may not be as easy! Otherwise, you'll need to find out where your web server records error messages (what log file) and then open that to see what the problem is.
  8. Thanks for the nice words. Very much appreciated! Can you clarify: are you having problems with the sandbox usage of PayPal or the production usage?
  9. You can swap !empty() for empty() if you're more comfortable with that logic, but you'd have to rework all the other logic, too. For example, your code checks if the password matches the confirmed password if the password is empty. It also sets $problem equal to true if the password is not empty. Both of these are backwards. If you want to use empty(), rework the following subsections, too.
  10. Apologies for the delayed reply; I was on vacation! Kudos for figuring it out, though, and thanks for posting your solution!
  11. Apologies for the delayed reply; I was on vacation! Thanks for your question and interest in the book. The fourth edition was a really heavy rewrite of the 3rd edition; the fifth edition is a fairly mild update: Fixed all the bugs; made everything up-to-date for the current standards, PHP 7, etc.; moved the appendix back into the printed edition, but lost Chapter 19 accordingly; added a bit more security. It covers the same OOP as the 4th and I'm pretty sure both cover PDO for MySQL. If you have the 4th edition, you may not benefit that much from the 5th (maybe look at "What's new in PHP 7" instead). Thanks again!
  12. Hey! Thanks so much for the nice words and for your interest in the PHP Advanced book. I really appreciate it. I don't have a plan to update either the PHP Advanced book or the e-commerce book right now, which means no new edition would come out this year. Really appreciate the thought and support, though!
  13. Ugh. Thanks for purchasing the book. Hope you like it! That's kind of a poor experience, though. Sorry!
  14. Oof. That's a new one to me (in this version of MySQL). The current solution seems to be to pretend it's an earlier version of MySQL by setting the environment: https://github.com/laradock/laradock/issues/1392
  15. Sorry for the confusion. Unfortunately I've never seen the Kindle version, let alone the sample, so I can't speak to it in too much detail. However, you can find Script 1.1 here: https://github.com/LarryUllman/phpmysqlvqp-5ed/blob/master/ch01/hello.php
  16. Thanks for the nice words and for the interest in the books! I really appreciate it. I'd do those books in the opposite order, though. The PHP & MySQL has some overlap with this one, but goes into much greater detail, in more depth, and uses different examples. You'll probably want a bit more practice in before reading the Advanced book. Thanks again!
  17. Yeah, so locking the tables would work. I have a little bit of concern about the performance hit that may cause, but using a write lock helps and you probably won't have enough traffic that it's a concern. I don't have a better idea off the top of my head. Kudos for solving this so expertly!
  18. Hmmm...so I don't have a great answer for you here. With foreign key constraints in place, it's supposed to be a PITA to wipe out tables. Your solution seems to be okay. The only other thing I thiiiiiiink works is: Delete * from table B Delete * from table A (now that the constraints aren't an issue) Truncate both I'm not positive that works all the time and it's not necessarily better.
  19. Thanks for the nice words! I'm pretty sure password_hash() was added since the book was written. I'd use password_hash() for all my projects at this point.
  20. Ah, kudos for figuring that out and thanks for sharing. I'm not familiar with HeidiSQL so I probably wouldn't have known that was the cause!
  21. Ah! Sorry for the confusion, you may have found a bug. I would have thought I would have caught this! The conditional on line 22 only confirms that the query ran okay. It actually needs to confirm that one row was returned instead. So sorry about that! I'll get it fixed.
×
×
  • Create New...