Jump to content

requinix

Administrators
  • Posts

    15,289
  • Joined

  • Last visited

  • Days Won

    436

Everything posted by requinix

  1. Are you sure that URL is returning what you expect? What do you see if you console.log the whole data object?
  2. Ahhh, I forgot about the template edit...
  3. What have you tried so far?
  4. Maybe. Maybe not. Really hard to tell since we don't know how SendMail works. Try it and find out.
  5. Start with a blank array where you'll hold all the previous rolanIDs that you have "seen" associated with other suppliers. Then loop through your $test array. For each supplier, look at each of their rolanIDs. If the value exists in the "seen" array then unset it in the supplier's array. If not then add it to the "seen" array. When you've looked through a supplier's rolanIDs, check if that array is now empty (because you removed everything in it). If so, remove the entire supplier from your $test array. Questions? Try writing code for that. If you have problems, post the code you've written so far and tell us about what's going wrong.
  6. https://www.google.com/search?q=How+to+activate+SSL+on+website+hosted+with+Google+Cloud+Server
  7. Looks good so far.
  8. Are you trying to show prospects with some of the deal information? Or deals with some of the prospect information? The latter is easier: you SELECT the fields you want FROM the deals table, then JOIN in the prospects table ON the two tables matching their prospect IDs (and also add the fields you want from that to the SELECT list, of course). The fact that the same prospect could show up multiple times for multiple deals isn't important. The former is a bit trickier because you should think a little harder about precisely what it is you want to do. Show a prospect and then list the associated deals underneath? Somehow summarize all the matching deals? Your example seems to suggest that you want to focus on the deal information, then show alongside it the information about its prospect.
  9. Dump the value of __DIR__ so you can see what it ends with. You can assume that's mostly always going to be the case. Then consider whether there are possible exceptions to that. Then realize that having doubled-up slashes doesn't cause any problems.
  10. As long as each one has the $ then it's a variable, and if undefined PHP will just treat it as null (and 0). The name-to-string thing applies only to constants, as in code like const PREVBAL = 1; const LATECHG = 2; const SECDEP = 3; const DAMGE = 4; // typo const COURTCOST = 5; const NSF = 6; $due = PREVBAL + LATECHG + SECDEP + DAMAGE + COURTCOST + NSF; and that behavior has actually been removed since PHP 8.
  11. Might I suggest not using backslashes at all?
  12. Because "John" is a reasonable example of an fname, I would think...
  13. PSA: I will remove any further posts which tell OP how to do the task as-asked. As well-intentioned as the question and its direct answer is, using variable variables is not a good thing.
  14. 1. https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity 2. <table class="classname"> <tr> <td>This has the class</td> </tr> </table> <div class="classname"> <table> <tr> <td>So does this</td> </tr> </table> </div>
  15. What? Rather than this pattern you're starting, which I think you're saying doesn't work, consider sprintf: $domains = [ "BSCSCAN" => "https://bscscan.com/token/%s", "TRONSCAN" => "https://tronscan.org/#/token/%s", "DGB" => "https://dgb.com/token/%s", // ... ]; $url = sprintf($domains[$checkSqlRow["ADDRESS"]], $address); echo "<td><a href='$url' style='color:lime' target='_blank'>$address</a></td>";
  16. Admins really don't like it when users try to bypass restrictions.
  17. If you're using PDO and SQLite then why is there calls to mysqli_query and mysqli_close in there?
  18. That would be because the HTML is invalid. Did you notice that?
  19. Which is why I didn't say anything about it being wrong or not working. And I'm trying to tell you what you have to change with your not-working code in order to make it work.
  20. So basically it's a question of syntax. <?php tags are for entering PHP mode. this is html mode <?php this is php mode echo "this is still php mode even though you're outputting html"; ?> back to html mode So the <?php in echo '<a href="https://bscscan.com/token/<?php echo $checkSqlRow["ADDRESS"]; ?></a>'; won't work because you're already in PHP mode. Compare that to <a href="https://bscscan.com/token/<?php echo $checkSqlRow["ADDRESS"]; ?> "style="color:lime" target="_blank"> which starts in HTML mode, uses <?php to switch to PHP mode and output the address, then switches back to HTML mode. If you want to echo some HTML with a PHP variable in it, you can do that with echo '<a href="https://bscscan.com/token/', $checkSqlRow["ADDRESS"], '</a>';
  21. That's a lot of queries to run. Start off with a single query that gets all the replies for that post or whatever it is. All of them. Then shove them into an array based on their parent ID. $comment_parents = []; $count = 0; /* get each $row from the query { */ if (!isset($comment_parents[$row['parent']])) { $comment_parents[$row['parent']] = []; } $comment_parents[$row['parent']][] = $row; $count++; /* } */ That also gets you a count of the number of comments, which it seems you want. Now you display them. What's the markup? I don't know. But you're pretty much guaranteed take a recursive approach: show one comment, then immediately show all the comments below it, and repeat. function showComments(array $comment_parents, array $comment, int $level = 0) { /* show the $comment */ foreach ($comment_parents[$comment['id']] ?? [] as $child) { showComments($comment_parents, $child, $level + 1); } } foreach ($comment_parents[0] as $comment) { showComments($comment_parents, $comment); }
  22. The best way we can help is if you know what you want to do but don't know what the code needs to be. We're good with code. We're not good with things like "able to show ethscan website". You have to figure out what it is you need to do - like, are you talking about a <a> or an <iframe> or what - and then we can show you what code you need to do it.
  23. Not that I know of. But are you sure you want something slick? Maybe something readable would have its advantages?
  24. To get a new number every day, seed the RNG with a number that stays the same all day long - say, the date in YYYYMMDD format - then request a random number. With the same seed you'll get the same sequence of numbers.
×
×
  • 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.