Jump to content

requinix

Administrators
  • Posts

    15,274
  • Joined

  • Last visited

  • Days Won

    432

Everything posted by requinix

  1. Unless you think you can get an official answer from the Gmail team about why some emails were spam and some weren't, you're going to have to settle for my answer of "it varies by account".
  2. Yeah. It's called "some people think these emails are spam and some people don't". There is no absolute truth about what constitutes spam. It can vary by account.
  3. Start with an empty array where you will store everything. Use explode() to split the whole textarea string into an array of all the lines. Then use a loop to go over all those lines. Split each line into a name and a country. Check if the empty array from before has an entry according to the country. If it does not, add it as a (sub) array. Append the name to that (sub) array. Try writing the code for that. If you have problems, post what you wrote.
  4. Ohhh... yeah. Okay. This makes sense now. A (start, end) key finds the start quickly but the end is only useful for an exact match of a start value. Which is useless for the second half of a BETWEEN. And the lone end key won't do anything useful. So you have to do it in two pieces. I was thinking the (start, end) would somehow work for finding an end given an initial position located by the start value, but that's totally wrong.
  5. It doesn't matter what the domain is. It's just an email address.
  6. It depends on the service. I don't think you can safely change everything: some of them may use the same mail system for all of the domains, some of them might not. What's wrong with the original email addresses? Why do they have to change?
  7. That's quite a difference. What does the EXPLAIN say? I would think they should be the same: index scan to find the start, index scan to find the end, return everything (which should be just the one row since ranges don't overlap).
  8. Going to need more information than that. What are these emails? Where are they coming from? Why are they so mixed up if you don't want them to be? Why are you trying to change them to be from different domains?
  9. The query I posted won't have that problem.
  10. It's the best way to check an IP address range. But now that I look at the query, it is kinda weird what it's doing. Why is the <= condition inside the subquery but the >= is outside? SELECT id FROM lookup WHERE INET_ATON('$ip') BETWEEN start AND end ORDER BY start DESC, end DESC
  11. You've managed to type non-breaking spaces around the "t". Delete it and type again. Then see if your editor doesn't have some way of turning off typing non-breaking spaces (likely when you hit Shift+space).
  12. If the question is about how to use PDO then that's a PHP matter. If the question is about the query you're trying to run then that's a MySQL matter. But don't worry too much about it. There's a lot of overlap. Worst case is that someone will move the thread to the right place.
  13. Are you saying you would set up a loop in PHP of all the dates, and execute that query for each one?
  14. IP addresses are strings. Strings need quotes. Since you've posted this in the PHP forum and not the MySQL forum, I'll mention that you could do the inet_aton work within PHP if you wanted. Numbers aren't strings.
  15. First of all, pulling every single user in the table is silly. Your starting query needs to be one that returns to you the join date and the number of users from that date. It'll involve a GROUP BY. Possibly a DATE_FORMAT too, if your join date is actually a join date/time. Once that's ready, Do you care about having the individual day counts too? If so then feed all these numbers into an array and average it. If you don't care about the individual counts then take the query that gets each day, wrap it in a subquery, and in the outer query do an average over it. So the final query is an average of another query.
  16. That is silly. Unless there is something important that you haven't described, there is absolutely no reason whatsoever to use Javascript to disable an element (no less to disable it using a mouseover event) when you could be using your PHP to output a textbox that is already disabled. You know that you can mark a textbox as disabled within its HTML. You know how to check a condition in PHP. I don't understand where the difficulty is in combining those two together to get a disabled textbox when some variable has some value.
  17. Did you do the other part of what I said in my post?
  18. You can use variable variables syntax to get to it. echo '<td>' . $xmlLineItem->{"detail.description"} . '</td>';
  19. Does the XML actually say <detail.description>?
  20. <?php if($gst="OUT"){ <input name="noopaxs" id="noopaxs" readonly = "" value="<?php echo $row['noopaxs'];?>"> else{ <input name="noopaxs" id="noopaxs" value="<?php echo $row['noopaxs'];?>"> }} ?> Couple issues in there: 1. One = means assignment. Two == means comparison. Make sure you use the correct one. 2. You cannot put HTML directly into PHP. If you want to write HTML like you did above then you have to first leave PHP mode with a ?> and then, when you're done, go back into PHP more with a <?php. Like how those two echos look: the <?php switched from HTML to PHP mode, then the ?> switched from PHP to HTML mode.
  21. How familiar are you with PHP?
  22. Did you remove the @s? Next step is to modify your code so that you can know whether each mail() was successful: by checking the return value. If either call returns false then the mail will not get sent.
  23. What article? Because if that's what it says then you should stop reading it. Do you think the browser is doing that? Saying "oh, this textbox is disabled, I shouldn't update the database", or "oh, this textbox is readonly, so if the user changes it then I need to update the database"? It isn't. Which is why what the article says is technically wrong. And it's wrong in a way that is important for you to understand. You know how to check a condition. You know how to mark a textbox as disabled. Combine the two. If you have problems making that work then post what you've tried.
  24. Remove the @s. That hides errors. If there are errors you need to know about them. Was the email marked as spam/junk?
  25. "Sold"? I don't know what snake oil GoDaddy is trying to sell you, but DKIM is completely free, and as long as you control DNS for your domain (which you have to for SPF) and the emailing code (which you do) then you can set it all up yourself. It's also industry-standard. So if you want to do SPF only, have a single email go through, and then think you've solved the problem, then be my guest. It's not my emails going through the spam filters.
×
×
  • 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.