Jump to content
Larry Ullman's Book Forums

Larry

Administrators
  • Content Count

    5310
  • Joined

  • Last visited

  • Days Won

    147

Larry last won the day on September 23

Larry had the most liked content!

Community Reputation

428 Excellent

About Larry

  • Rank
    Administrator/Writer

Recent Profile Visitors

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

  1. Yeah, that can be pretty common. Kudos for figuring it out and thanks for letting us know you did!
  2. That's a really good technique, Jay! Thanks for sharing that!
  3. Thanks for catching that and for letting me know! I'll pass it along to the publisher.
  4. You need to execute the query from within the FOREACH as that's the only place you have access to each individual selected size.
  5. it's in the sql.sql file: https://github.com/LarryUllman/phpmysqlvqp-5ed/blob/master/sql.sql
  6. Ah, no, you can't do that. You'll need to use PHP to break the multiple selections into their single counterparts and insert each one separately.
  7. Add the "multiple" property to the opening select tag: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select
  8. I haven't used PHPStorm in a long while, so I'm not positive but maybe adding id="gender" to both of the inputs would solve it.
  9. I'm not sure what you mean by "combine the two queries together" as one is an INSERT and another is a SELECT. They cannot be combined into one. But from the looks of it what I think you should be doing is executing the INSERT query, then checking for affected rows, then executing the SELECT query. Also, separately, it's pretty weird to print out JavaScript like you're doing as opposed to just redirecting the browser directly within PHP.
  10. It wouldn't make any sense to prevent a user from using the same password as another user. I've never seen that done. As for forcing people to reset their password, that makes for good security but it's still not that common and definitely not common--in my experience--in places it matters most, such as financial institutions. I also personally find prevention of re-using a password to be annoying, although not a terrible inconvenience when using a password manager. My current approach is pretty strongly a matter of: tell users how to be smart about their passwords but don't put many restrictions on what passwords they actually use.
  11. I assume you're putting blank values into the database then. Right now you bind 7 variables to parameters but only assign values to 5 variables.
  12. Thanks for sharing what you found! Personally, though, I'd still use the GET method here. POST doesn't really make sense in this case.
  13. Most likely this is because you don't have an input named 'pass' in your form. On another note, though, it's not a great idea to store the user's password in an unencrypted manner.
  14. Thanks for the interest in the book! I do appreciate it. I don't actually have a list of changes, however. I'd recommend checking out what's changed in PHP since the book was written. The major changes there are probably most important for your case. Best wishes with your studies!
×
×
  • Create New...