Jump to content

benanamen

Members
  • Posts

    2,134
  • Joined

  • Last visited

  • Days Won

    42

Everything posted by benanamen

  1. Exposing your PC to the entire world is a really bad idea. The various wamps are intended for Development, not Production.
  2. What guarantee do you have that it was actually submitted by the users form and the users date picker? There are several ways to make a Post Request without using the users form. Bottom line, it is user supplied data and you well understand to NEVER trust user supplied data. The one case where you can safely get away with a variable in the query is if the date (or whatever) comes directly from the code, but then then that isn't user supplied data is it? But why do it? Consistency is always a good thing. No you didn't. Read the manual and see what you did wrong.
  3. The OP created the column as datetime and is trying to insert a text string. $date_col = "test";//
  4. If you just leave a closing php tag hanging around of course it will break. Why would you remove proper code?
  5. What is the code from blog-approval.php? The tester is not displaying the error you posted. It is displaying a 1 as it should. If you echo'ed the line in your tester you would see a hash. Also, phpinfo() does not require echo.
  6. @gw1500se, there are numerous issues with the tutorial you linked to. It is a very bad example to learn from or use as a reference.
  7. BEWARE This user @haymanpl will threaten you with physical violence if he doesn't like your post. The exact response on the cross post that prompted this user was "Didnt you like the help you were getting on the other forum" (This one).
  8. You have a parenthesis floating outside of Php just above the closing body tag.
  9. It doesn't make sense to override a method with the same exact method. How about telling us what the real problem is you are trying to solve instead of asking about your attempted solution to solving it. How do you expect it to print anything when there is no code to output anything? No echo, no return, no nothing.
  10. It is called a Subquery. Now you know the proper term so you can look it up and learn about it.
  11. Assuming Sarcasm.... So are you saying you are OK with explicitly verifying 50% of a valid system login to an attacker? So instead of just saying "Username Invalid " you want to say "Congratulations, that exact username is in the database. Now you just need to guess the password that goes with it"?
  12. Just how many different errors do you expect? The registration (insert query) is either successful (true) or it fails (false). duplicate error = false other error = false no error = true You do not want to output system error messages to the user. In the case of a duplicate username, you do not want to specify that the username is already used. That would open you up to a User Enumeration Attack.
  13. Mysql is case insensitive by default. Doesnt matter how Fabian is cased.
  14. In addition to what @Barand said, your Method should return a Boolean. You have hard coded a redirect and have done nothing in case of failure which could be something other than a duplicate user. As is, if you want to redirect somewhere other than what you hard coded you have to edit the Class. Classes should be closed for modification. That is known as the "Open-closed Principle" and the the "O" in the SOLID Principal of Object-Oriented Programming. Do the redirect outside the class in the program flow. PSEUDO Code if ( $var->regUser($x,$y,$z) ) { // Success } OR $status = $var->regUser($x,$y,$z) ? 'Success' : 'Failed'; I would not put the password hashing in the method or class. Hashing a password is not really related to doing a DB insert query which when you get down to it, is really what you are doing. It would also mean you have to duplicate the hashing code such as the case of a password change. Pass the hashed password to the Class.
  15. What is the real problem you are trying to solve by doing this?
  16. Get rid of all the space in your method calls.
  17. Op, could you tell us why you want to do this?
  18. That error could not have happened from a windows update. Post the code.
  19. Instead of spinning your wheels trying to configure your own dev just do what I told you and you will be up and running in seconds
  20. The easiest way to get a correct LAMP stack working for older php is to run Laragon Portable with Php 5.4 https://laragon.org/
  21. Not sure what you are doing with this, but you can easily generate a CSPRNG (Cryptographically secure pseudorandom number generator) in Php7 with minimal code. <?php $bytes = random_bytes(5); var_dump(bin2hex($bytes));
  22. This reminds me of the Bike Shed Problem.
  23. It just doesn't matter. MariaDB is a drop-in replacement for MySQL. If you really want to head down this path you might as well throw in the "What about Percona?" which is another drop-in replacement fork of MySQL.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.