Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

  • Days Won


Larry last won the day on December 18 2018

Larry had the most liked content!

Community Reputation

414 Excellent

About Larry

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. So sorry for the delayed reply! This one somehow slipped past me. Are you still confused by this/still need some insights or did you figure it out while I was daydreaming? Apologies gain for missing this!
  2. Thanks for your question! The difference between the 5th and 4th editions is somewhat minimal. The difference between the 5th and 3rd edition is significant. The difference between the 5th and 2nd edition is...oceanic! The 2nd edition is probably about 10 years old and I don't even know if PHP 5 existed then (the current version is PHP 7). So much has changed!
  3. Hmmm... I've not been in this situation before but I imagine you have three options: - Uninstall MySQL and XAMPP and then reinstall XAMPP - Try to configure XAMPP to use your existing MySQL install (I have no idea what that would entail) - Just install Apache separately and forgo XAMPP I'm not sure which is best for you, it would depend in part upon how the current MySQL install was used and whether you want the easy solution or the "interesting" one!
  4. Ah! Good question! The reason is because we don't want to assume the data will come from the form or in an unadulterated way. It'd be really easy to submit data from elsewhere to this script or to modify the form in the browser and then submit that. So these conditionals provide an extra layer of security.
  5. In answer to your question, the concise.css might have another class later on that's conflicting. Your best bet is probably to move on (CSS is hard if you don't do it fulltime and it's not critical to your learning at this point). Second to that, I'd use the developer tools in Chrome to see what CSS rules are or are not being applied.
  6. So could you confirm... - Running the "SHOW TABLES" command directly on the database returns multiple records (i.e., multiple results)? - The while loop is only executed once? - Do echo mysqli_num_rows($r) to see how many rows are in the result.
  7. That's all good info! The files should be just numbers without extensions, that's good. The next thing I'd do is run view_print.php?pid=1 directly in your browser and see the result. Hopefully you'll see a PHP error that explains what's going on.
  8. What is the HTML tag for one of the images that's not showing?
  9. Hey Jack. Right now you're literally passing the string "lid" around, which won't do anything. You should double-check how the book does it. (Separately, there's no method for A tags but that's not causing your problem.)
  10. Hey Marie. Thanks for the nice words! Truly appreciated. By PHP, I was wondering how the PHP script is encrypting the password that you're storing (e.g., using the password_hash() function). But if it's working now, maybe that's good enough!
  11. Marie, what is the definition of the password column in the database (its size in particular) and what are you using to encrypt the passwords?
  12. Thanks for your post and questions! I have been keeping the PHP & MySQL book up to date, and the 5th edition does reflect changes in PHP 7 (the book was written with PHP 7.1.7). I couldn't say for sure whether I'll ever do too much OOP in this particular book, though. It's a complicated subject--my PHP Advanced book spends hundreds of pages on it--and I wouldn't necessarily agree that MVC or OOP is ubiquitous in the PHP community. But these are the kinds of things I re-evaluate with each new addition and appreciate you raising the question!
  13. You're quite welcome and thanks for the nice words!
  14. Yes, your understanding of the pros and cons of this scenario is correct. As for your questions... 1) The only way I know of or can imagine that being possible is by adding login functionality. When the user goes from browser A to browser B, they need to somehow tell the site "I am the same person". 2) Not hard at all! Part of the design of the two applications in the book was so you could take pieces you liked from either when creating your own solution. Here you'd take the login/logout functionality, plus the additional user database table and implement that within the new site. Then you need to tie the logged-in user to the tracking session. You'd still use cookies but in the database you'd associate the cookie value with a specific user. Let me know if you have additional questions!