Jump to content

benanamen

Members
  • Content Count

    1,936
  • Joined

  • Last visited

  • Days Won

    36

Everything posted by benanamen

  1. LOL, that's exactly where I got that from. He really has been a ghost. Hasn't shown up anywhere.
  2. Op, you would do better to separate the first and last names into their own columns. A simple use case example for using only the last name would be the intro to a letter. As is, you would have to do some code gymnastics just to get the last name only. Dear Mr. Doe,
  3. I know. That was just an "in addition to the problem". I agree the problem is the preceding code.
  4. Is FUNCTION_NOT_FOUND actually a defined constant? The logic makes no sense. If the function exists, it is "Not found"?
  5. Sounds like a great opportunity to learn something new. I just happen to know about a great PDO tutorial that is easy to understand with great copy/paste code examples. If you get stuck with it come on back and we will help you out. https://phpdelusions.net/pdo
  6. You have absolutely no code that does anything with your query string. Start with this tutorial and then give it another try. https://phpdelusions.net/pdo
  7. That is an interesting number format I have never seen. Could you please tell us what that is about and what it represents.
  8. Since you are new, you may not know the authors of Php have offered a free manual. You will need to refer to this manual all throughout your programming journey so best to bookmark it. Php Manual. Here is the specific manual page that will teach you about if/elsif/else. https://www.php.net/manual/en/control-structures.elseif.php
  9. All you need is a simple if else checking $_SERVER['HTTP_HOST'] and setting the connection parameters accordingly
  10. I got mixed up on who was saying what. I thought @SaranacLakesaid that regarding what he was trying to do.
  11. Ok, so a subscription _ types lookup table with subscription_type_id, subscription_type_description Then in data table you have subscription_type_id keyed to the lookup table.
  12. Seems to me it would be better to have contract_start and contract_end date columns. If you will be needing historical data then you would have a table for storing each term start/end dates keyed to the user_id. You will also gain a lot of flexibility with being able to do date calculations and Analytics.
  13. That is incorrect. It does exactly what it says, it resends the request. If you modified the request, the modification is sent. You likely didn't test it properly. Test it on a request that updates a database record and see what happens.
  14. Is that the way it is in the CSV file?
  15. The you should be using INET6_ATON Ok, Why is it in that format?
  16. https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functions.html#function_inet-aton
  17. "They" sure can! Not only read it, but manipulate it and even send parameters that are not in your form. This is why you need a whitelist of expected/allowed fields and validation.
  18. That would be better. You would look up the price from the db when you need to actually do something with it.
  19. No, it is trivial for a user to change the price submitted.
  20. How about telling us what the real problem is that you are trying to solve with this code.
  21. You need to do a JOIN with the table the holds the user info. You only need one query.
  22. Except that isn't the solution. For one, if you dont kill the script after a header redirect, the rest of the code still runs. Using a sequential numbering of pages points to a serious design flaw. If you have a million users, are you really going to have and maintain a million pages?
  23. benanamen

    Kevin

    That is a very poorly coded script and is very vulnerable to an XSS Attack.
×
×
  • 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.