Jump to content

benanamen

Members
  • Posts

    2,134
  • Joined

  • Last visited

  • Days Won

    42

Everything posted by benanamen

  1. You may also want to look into Temporal Data Tables or Audit Logging depending on your specific needs.
  2. The best way to do DB backups is not with PDO. What you want to do is write a shell script that acts directly on the DB and set up a CRON job to run it at whatever intervals.
  3. The first thing you need to do is stop mixing obsolete mysql_* code with mysqli.
  4. If you passed it in as a parameter you would never have to edit anything and could use the function for any currency
  5. I have been using MVP (Model - View - Presenter) for some time. Works quite well.
  6. By the way, your test_input function is a block of code from the 90's that needs to be taken behind the barn and shot and buried forever. Surprised to still see that floating around. Additionally, NEVER EVER put variables in your query. You need to use prepared statements
  7. What is this "bridge" you created? What do you mean "doesn't allow direct access to mysql Server"? What does Mysql have to do with where you are putting your Php code?
  8. Why are you using Cookies for the login instead of sessions? Do you know the differences?
  9. 1. If those are your real column names you need to change them to something meaningful. Nobody knows what BBB or YYY or CCC means. 2. You likely have a DB design problem that needs to be normalized. Tell us about this data and what it represents.
  10. Hi Unique Idea Man, AKA UIman, AKA visiter52, aka 2020. After THREE years of us trying to teach you about Mysqli and coding under your various alt's across numerous forums, are we really right back at at the very beginning as though you have never seen this stuff?
  11. $_SERVER['PHP_SELF'] is vulnerable to an XSS Attack. Just delete the action completely. Yes, it is, but it is a Security problem and shouldn't be used. You "could" use it if you enclosed it in htmlspecialchars but that is just sloppy. Cleaner to leave the action out completely.
  12. print "<p style='color:red;'>Could not delete the blog entry because :<br/>" .mysqli_error($dbc);
  13. You can use set_exception_handler to create a custom exemption function. https://www.php.net/manual/en/function.set-exception-handler.php
  14. This page may be of help to you. We all started at the beginning. http://www.catb.org/~esr/faqs/smart-questions.html
  15. What is the real problem you are trying to solve by doing this? What is the high level overview of what you have going on?
  16. OP, do not create duplicate posts. Duplicate of https://forums.phpfreaks.com/topic/310907-help-to-add-redirect-url-to-submit-button/
  17. The else is not needed. function tax_invoice($state, $subtotal, $credit, $shipping) { if ($state == "FL") { return ($subtotal - $credit + $shipping) * .07; } return 0; }
  18. Allow me to introduce you to the NOT conditional. https://www.techonthenet.com/mysql/not.php
  19. You do realize there is a difference between == and = right?
  20. What is the real problem you are trying to solve by doing this?
  21. You first need to fix your DB design. Consecutive numbered columns is a red flag your DB is wrong. Look up "Database Normalization" and then fix the DB.
  22. LOL, that's exactly where I got that from. He really has been a ghost. Hasn't shown up anywhere.
  23. 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,
×
×
  • 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.