Jump to content

requinix

Administrators
  • Posts

    15,232
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. You have to put something in your query so that you can tell where each result is coming from. Then use that to output the correct link.
  2. Yeah. Firewall off everything you can as strictly as you can, and use non-standard ports for private services like SSH.
  3. Perhaps you would like to be so much like an AI bot it's funny. me made your day?
  4. That's pretty much exactly what I said you needed to do, so...
  5. Pick the one that looks most reputable and looks like what I'm about to describe, try it again, and if that still doesn't work then post exactly what you did. There should only be one redirect: if the URL isn't www or it isn't HTTPS then redirect to the HTTPS+www URL. We use them for the certificate but handle the server configuration ourselves.
  6. If you can't get it to work then that means you tried something. What did you try and what happened when you tested to see if it worked?
  7. The term you are looking for is "AJAX".
  8. mod_xsendfile is not bundled with Apache, that is correct. You have to go download it.
  9. If you are running Apache then you can install Apache modules.
  10. To be clear here, what do you mean by "shell the site"?
  11. Hmm. Apparently I misread the desired output and totally didn't see the whole "split by underscore" bit. That adds a little more difficulty than I had accounted for. The one-liner was array_merge_recursive( array_fill_keys($keys, []), // initialize to key => [] ...array_map( // flatten outer values array $values => array_combine($keys, $values), // inner values arrays get keyed $arrayValues ) ) Dealing with the keys too will be getting more complicated than I would like to see in a single statement.
  12. Hint #2: I gave you the function calls in order, so array_fill_keys to get one array, array_map with a simple callback that uses array_combine, and finally array_merge_recursive with both results. Hint #3a: array_fill_keys starts off your output array with no data, array_map processes your data array, array_combine does the most logical thing it can do under those circumstances. Hint #3b: If array_merge_recursive tries to merge an array and a string, it'll add the string into the array.
  13. Want a hint? It's a pretty big one. array_fill_keys + array_map with array_combine + array_merge_recursive One-liner.
  14. It's an online store? Online? Why should it ever be closed?
  15. I'm not sure I understand what's going on yet, but this might help?
  16. What? What output are you trying to get for that, and what process did you (you, personally) follow to get the answer?
  17. Let me know when you did it and what the result was.
  18. $total_rows. Or create a new variable just for the folder's rows. foreach($folders as $folder) { $search_mailbox = $link->prepare("SELECT * FROM $folder WHERE from_email LIKE ? OR subject LIKE ? OR message LIKE ? ORDER BY received_date DESC LIMIT $offset, $limit"); $search_mailbox->execute([$searchemail, $searchsubject, $searchmessage]); $folder_rows = 0; if ($search_mailbox->rowCount() > 0) { foreach($search_mailbox->fetchAll() as $k => $row) { $email_number = $row['id']; $search_from = $row['from_email']; $search_subject = $row['subject']; $total_rows++; $folder_rows++; echo $search_subject . '.........................' . $folder_rows . ' / ' . $total_rows; echo "<br>"; } } } You should see $folder_rows stay between 1-50.
  19. Then your code must not be the same as what you originally posted. Because what you showed there very clearly did 50 per folder. You also had a couple echo statements in it. One included the value of $total_rows. Are you saying you get more than 50 because the value outputted goes beyond 50? Because you do not reset that value for each folder. Reset the value to 0 before each folder's query, then see what output you get.
  20. First, I need some confirmation: are you getting more than 50 per folder? Or up to 50 per folder and more than 50 total per page?
  21. Ooh, you almost had me there. I didn't realize you were being sarcastic until I nearly hit the Submit Reply button. Great joke. 👍
  22. What do you mean by the notification "does not work"? What does it actually do? What were you expecting it to do?
  23. LIMIT most definitely does work. But it only applies to one single query. If you want to limit multiple queries then you "have" to do that yourself. But what I said is still the best way to go. It will take some work to change to now, but it makes a great number of things much easier.
  24. I don't see that code attempting to do a redirect. Please post the version you tried to make do the redirect since that is, after all, the one that doesn't work. When you do post it, please use the Code <> button so it doesn't end up as that blob.
×
×
  • 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.