Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

  • Days Won


Larry last won the day on July 9 2019

Larry had the most liked content!

Community Reputation

422 Excellent

About Larry

  • Rank

Recent Profile Visitors

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

  1. I've reviewed the MariaDB documentation for timestamp: https://mariadb.com/kb/en/timestamp/ It looks like the first timestamp column in a table has different behavior than the second. We want date_created to be automatically set on creation, but not update. We want date_modified to be automatically updated on each change. To get that behavior you'll need to change the DB and the SQL queries. Assuming we want both the date_modified and the date_created, I'd be inclined to put the date_modified column first and then populate date_created to the current timestamp upon INSERT. Or just drop the date_created column entirely and update the SQL commands accordingly.
  2. Unfortunately I just searched templates.com and it doesn't look like they offer it anymore. However, pages 207-210 (US English, print edition) do demonstrate the original HTML fairly well.
  3. Ah, okay. First, thanks for all the details. Second, I would advise against trying random things as you debug. It's a natural thing to do but tends to lead to more confusion. Here, for example, the upload script purposefully doesn't append the file extension, but that's totally okay because the show_image.php script doesn't use the file extension either. So that's actually correct and you definitely don't want to add the .jpg extension to the uploaded file (for starters, what if the upload was a PNG?). Normally if you're getting this result it's because your path to the file is incorrect. That your upload script uses ../../ch19_uploads/$id but show_image.php uses ../ch19_uploads makes me think that's the problem (assuming show_image.php and the upload script are in the same folder). Again, I definitely wouldn't move the folder, I'd just make sure you get the file path correct in the code. You can also try using an absolute path to the folder in your code.
  4. Are you talking about the original template or the code in the book?
  5. What operating system are you using? Have you tried following the book's instructions?
  6. Okay, it'll take me a couple of days but I'll test this out on my own server to see what's what.
  7. It's hard to say given the information provided. However, that your code uses 'pass1' suggests this isn't the registration form but rather the password update form. Are you sure you've edited the correct file?
  8. It's not a matter of secrets. Forums like these or Stack Overflow are here expressly to share information and to help others. Honestly, the absolutely best thing to do would be to use mysqli_error() b/c then MySQL will tell you what the problem is, whereas we're just guessing. But without that knowledge my best guess would be that the PHP user for the script doesn't have execute permissions to run the stored procedure. Or you have the database wrong. In either case, mysqli_error() should tell you the actual cause.
  9. I'm so glad you were able to figure this out. It was a tough one. Kudos! And thanks for sharing what you learned!
  10. Absolutely no problem. Do what you have to do. Sorry I didn't have a better answer for you in the first place!
  11. Basically that just means your query failed to run, which means the database spat out an error instead of any results.
  12. Ah, cool! And thanks for sharing your learning experience. If it helps, I still make dumb mistakes, too.
  13. I'd check the registration date. It's likely that multiple records have the same value there if they were created by a mass import.
  14. Ah, sorry about that but kudos for figuring it out and thanks for letting me know!
  • Create New...