Jump to content

cyberRobot

Moderators
  • Content Count

    2,951
  • Joined

  • Last visited

  • Days Won

    24

cyberRobot last won the day on September 5

cyberRobot had the most liked content!

Community Reputation

116 Excellent

About cyberRobot

  • Rank
    Much to Learn

Contact Methods

  • Website URL
    http://www.cyberscorpion.com/

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

84,831 profile views
  1. I'm guessing that you are using PDO for your database connection? Have you checked for errors? Perhaps the following will help: https://www.php.net/manual/en/pdostatement.errorinfo.php
  2. Note that HTML table tags (e.g. <table>, <tr>, <td>) should be reserved for tabular data. Perhaps one of the solutions found here will help: https://css-tricks.com/fluid-width-equal-height-columns/ You could also consider using CSS grids: https://css-tricks.com/snippets/css/complete-guide-grid/ Just be aware that browser support isn't exactly ideal for CSS grids. More information can be found here: https://caniuse.com/#feat=css-grid
  3. In case you're not aware, the PHP manual provides a description of the changes here: https://www.php.net/manual/en/migration70.php Of course, they don't directly describe the changes from 5.6 to 7.2. You would need to go from 5.6 to 7.0, both of which will no longer be supported by DreamHost in the near future. Then you can go from 7.0 to 7.1, etc. However, it's probably much easier to set up a test environment like the others have suggested. For the test environment, you could consider setting up a sub-domain through DreamHost. Then upload the web files there to see how they function. More information about sub-domains can be found here: https://help.dreamhost.com/hc/en-us/articles/215457827-How-do-I-add-a-subdomain- Also, to delay running into this issue again, you may want to consider moving to 7.3, which is the latest version of PHP that DreamHost supports. According to the following page, that version will receive security updates until the end of 2021. https://www.php.net/supported-versions.php Then, if DreamHost follows the same pattern, 7.3 would likely be removed from their servers in late 2022.
  4. Ah...didn't even think of that. Yep, the version of PHP is dependent on the website that calls the helper script. Thanks!
  5. I have a number of PHP helper scripts that are stored outside the root directory of my websites. Those scripts may be used by one or more of my websites. Let's say I have two websites Website A uses PHP 7.0 Website B uses PHP 7.3 Will the helper scripts be potentially executed using different versions of PHP? In other words, if Website B calls a helper script using a require statement, does that helper script execute as PHP 7.3? But if Website A calls the script, it would be executed as PHP 7.0.
  6. What are you looking to accomplish? Are you writing a script that processes all the information in the $_SESSION array and/or presumably the $_REQUEST array? If so, would using something like the foreach loop work for your project? That would allow you to process everything without destroying the original array.
  7. Ah...that's what was meant by HTML variables. That makes sense. The safest bet would be to use prepared statements when working with user-supplied data in your queries. That way you're less likely to make mistakes. However, as Barand pointed out, if you're able to validate the user data in some way (and you know what you're doing), the variable containing the data could be put directly into the query. Of course, variables that might contain something that would break the query, like a quotation mark, should go through the binding process of prepared statements. That way the quotes can be escaped so the query doesn't break.
  8. Serious question: is that case for every variable? $name should definitely be inserted using a prepared query since that contains a value supplied by the user. What about the date? If it's a date that supplied by the user, it should go through the prepared query. However, what if the date is generated by the server / script?
  9. Perhaps this will help: https://help.sender.net/section/api-integrations/
  10. Constant Contact has one here: https://developer.constantcontact.com/docs/developer-guides/api-documentation-index.html Here's another for MailChimp: https://mailchimp.com/developer/ I should mention that I don't spend much time with these services. I've only used them to set something up for others who are responsible for sending out mailings. Both services have work well for the project needs. Note that I haven't used either of the aforementioned APIs.
  11. I haven't used Audio() myself, however, the documentation found at the following link contains an example with an event listener for "loadeddata": https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement
  12. Did you write the script? If not, you might want to look into an alternative solution. For example, user-supplied information like what comes from $_POST['username'] should not be placed directly into the query. You will want to use prepared statements to prevent someone from performing SQL Injection attacks. You should also look into a solution that uses password_hash() for hashing passwords. More information about hashing passwords can be found here: https://www.php.net/manual/en/faq.passwords.php
  13. Yeah, I just noticed that after reading your post. I didn't notice the output discrepancy until after making my post. I was in the middle of writing something when your post came through.
  14. Based on the initial code above, $srs is passed to the output() function. In that function, the passed value from $srs is now stored in $obj, since that's what you named the function argument. Due to variable scope, $srs isn't going to be available in the function. However, you can use $obj to refer to the information. That's the variable you would use to perform the loop and output the data as you see fit.
  15. Do you, by any chance, have any backups of the database? Perhaps you could look through those backups for what was changed before. If you don't have any backups, are you using a third-party website host? If so, have you checked with them on any backups?
×
×
  • 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.