Jump to content

benanamen

Members
  • Posts

    2,134
  • Joined

  • Last visited

  • Days Won

    42

Everything posted by benanamen

  1. I know. That was just an "in addition to the problem". I agree the problem is the preceding code.
  2. Is FUNCTION_NOT_FOUND actually a defined constant? The logic makes no sense. If the function exists, it is "Not found"?
  3. 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
  4. 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
  5. That is an interesting number format I have never seen. Could you please tell us what that is about and what it represents.
  6. 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
  7. All you need is a simple if else checking $_SERVER['HTTP_HOST'] and setting the connection parameters accordingly
  8. I got mixed up on who was saying what. I thought @SaranacLakesaid that regarding what he was trying to do.
  9. 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.
  10. 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.
  11. 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.
  12. The you should be using INET6_ATON Ok, Why is it in that format?
  13. https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functions.html#function_inet-aton
  14. "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.
  15. That would be better. You would look up the price from the db when you need to actually do something with it.
  16. No, it is trivial for a user to change the price submitted.
  17. How about telling us what the real problem is that you are trying to solve with this code.
  18. You need to do a JOIN with the table the holds the user info. You only need one query.
  19. 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?
  20. That is a very poorly coded script and is very vulnerable to an XSS Attack.
  21. I agree. Stop doing code gymnastics and just store the data the way you want it.
  22. @zeus69, on an programming help forum it is expected that you have first made some sort of attempt at solving the problem you are asking about even if it's just a google search. That is why you get asked "What have you tried so far?" You said "I didn't do anything", thus the lack of interest in helping you. You need to make some sort of attempt at solving the problem yourself. If you get stuck, post on a forum what the overall problem is that you are trying to solve and what attempts you made at solving it along with the results you got and the results you expect to get. I would suggest you read through this page before posting on any help forums. http://www.catb.org/~esr/faqs/smart-questions.html
×
×
  • 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.