Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


maxxd last won the day on July 23

maxxd had the most liked content!

About maxxd

Contact Methods

  • Website URL

Profile Information

  • Gender
    Not Telling
  • Location
    North Carolina

Recent Profile Visitors

15,978 profile views

maxxd's Achievements

Prolific Member

Prolific Member (5/5)




Community Answers

  1. OK, now we've got the part of the code that matters. It would also be very helpful if you would provide any errors that are happening, or just what is happening in general. That being said, there are a few things; first and foremost, your mail host is smtp.office365.com, but you've turned off SMTP in PHPMailer by commenting out the $mail->isSMTP() line. Secondly, as far as I know, there isn't a `smtp/PHPMailerAutoload.php` file - the instructions tell you to include `vendor/autoload.php` and then use the PHPMailer, SMTP, and Exception namespaces. And finally, turn on verbose error reporting with the line $mail->SMTPDebug = SMTP::DEBUG_SERVER and see what's actually happening behind the scenes. One more thing I forgot. send() doesn't return a boolean, it throws an error on failure so put all of the PHPMailer code inside a try...catch block.
  2. You should include PHPMailer in your php file, then use it to send the email after the record has been successfully added to the database.
  3. Also, both methods should be using prepared statements - the delete is being driven off a $_GET variable. Not sure what the overall code base is that this came from, but I'd recommend not trusting anything you see in there all that much...
  4. Do yourself a favor and use PHPMailer - it's far easier and more robust than PHP's native mail() function. It also has great debugging output.
  5. It's a prepared statement, hence the prepare() method called on the $connection object. It's the correct way to run a query in PHP these days, so well done! In the SQL statement passed to the prepare() method, the `:username`, `:emailbox`, and `:passwordbox` are placeholders in the query. When you pass an array to execute(), that array contains the values to use in those placeholders, so the ':username', ':emailbox', and ':passwordbox' there are keys for the array so that SQL knows which value to plug in to each placeholder. Basically, using prepared statements blocks a potential avenue that hackers can use to attack your database or get your data. There are other benefits to prepared statements, but that's kind of the biggest and more pertinent for most systems.
  6. To tell you the truth, I thought rebooting a server would destroy the cache - I think it used to maybe? Or maybe I'm just remembering incorrectly. At any rate, yes ElastiCache is strictly AWS though I think everyone has their own versions. It's also easy to get mixed up because AWS also has it's own ElasticSearch implementation that isn't called ElastiCache and isn't related in any way. Because apparently they ran out of 2 and 3 letter abbreviations to use... Anyhow, I wasn't involved in setting it up but from the AWS console it looked to me like ElastiCache basically is a Redis cluster. And though I disagree with how we used Redis in the past, I will say there were only a handful of times it fell out of sync or lost data, and those were due to bugs in the code and not server or service failure. And if you're using it as intended it really is just a cache, so if you do lose something it shouldn't be a catastrophic loss - in my case, it was several weeks to a month or so of playing catch-up and rehydrating accounts that were affected but we didn't know until the user complained.
  7. Hidden text could be seen as keyword packing by search engines, and can hurt your ranking. WP Bakery is a paid plugin, so I'd honestly be a bit surprised if it doesn't do what it claims. The problem could be over-nested elements or, as requinix stated a couple times, the class is assigned to the wrong container element. If it truly doesn't handle the issue, request your money back and be vocal if the author gives you any guff about it.
  8. Given what you've posted, there isn't an action later in the page. You're checking for a value in $_POST, which will be set on page load after clicking a fomr's submit button (assuming that form's action parameter is set to 'post'). So you can check if $_POST['cat_title'] is set at the top of your page and redirect if it is. You don't want to render half a page then redirect a user anyway, right?
  9. Basically, business logic was designed and built around data being in the store as if it was persistent. Redis was treated as a first-class database and there were portions of logic that would fail catastrophically if the node was unavailable. Technically possible (obviously) just terrifyingly fragile IMO.
  10. Not saying it's a perfect use case, but it does lend itself fairly well. Persistence is always a consideration with Redis, but honestly with ElastiCache for Redis and the like, restarts aren't that prevalent in my experience. That having been said, my last job abused the crap out of Redis so my attitude may be a bit skewed by Stockholm syndrome...
  11. You could store usage stats in a Redis hash by user ID, option ID, and number of times selected. Get the top n option IDs per user and grab those from the database. Depending on how often your users interact with the system, you may not even have to crank up the TTL for the hash.
  12. In that case, Strider64 has given you your answer. Use JavaScript's test method.
  13. It sounds like you're using procedural programming, in which case I'd go with defining the variables as you need them. If you're using OOP I recommend defining any class properties at top of the class, before the constructor - with PHP it's not technically necessary, but I find it cleaner. As far as the use of isset() on null or == "", try empty(). empty() returns true if the variable is false (which null and "" equates to) or if the variable doesn't exist, so it covers all your angles with one check.
  14. I don't know exactly what you mean by this, but android supports HTML 5 semantic markup. If you want to make sure the email actually exists, I believe there are services that can do this. I've not used one so I can't vouch for the accuracy or operation, but a Google search should return some good places to start.
  • 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.