Jump to content

requinix

Administrators
  • Posts

    15,066
  • Joined

  • Last visited

  • Days Won

    414

Everything posted by requinix

  1. Can you PM me some information about your other account? Like the display name and email address? And I assume you've already checked the spam folder?
  2. When calculating the 25, remember to round up: ceil($number_of_respondents / $number_of_scenarios).
  3. Output buffering is another option. ob_start(); ?> stuff <?php $MesBody = ob_get_clean();
  4. Another thing to check is what exactly the API is returning, and whether the line break is a plain \n (that's being preserved as a newline) or a .
  5. What's the code for that? Is there a line break in the code's file at that point?
  6. You can't just stick a ".json" at the end and assume it will work. API documentation
  7. You can combine 1-3 by constructing the whole HTML, rather than starting with the and modifying it with jQuery. " " + navArray[keyValue] + " "The URL isn't going to be HTML-unsafe so you don't need to escape it using something like .text(). Step 4 can be done with just one listener on the parent element. $("#navMain ul").on("click", "li", function() { window.location = $(this).children("div#value").text(); });Otherwise you're creating event listeners for every element and you don't need to do that. Plus this can be executed before adding the LIs so you don't have to worry about that. And by the way, the ID on the DIV is wrong: IDs need to be unique across the entire document, but fortunately you don't need an ID in the first place because there's just the one div so .children("div") would be just fine. But more important than all this: (1) why aren't you using just plain links and (2) why are you doing this in Javascript when it's just a static set of links?
  8. Sounds like a problem with margins. Any configurable options with the PDF converter?
  9. Well, you are putting the text in a table. How about not doing that?
  10. Apparently you figured it out already, but those $types need to all use "image/".
  11. I could, but it seems you've disabled right-click to prevent your code from being "stolen".
  12. Still working. https://jsfiddle.net/s9c34k71/ Check if your browser is reporting errors. See what CSS is being applied to the rows. Poke around and see what you can find. Unless this is somewhere we can inspect?
  13. Ah, I'm wrong. LIMIT...OFFSET is perfectly legal. Someone should have RTFMed. That thing you linked mentioned strings being bad. Try $offset = (int)$_REQUEST['page'];
  14. Use date_default_timezone_set to make PHP use whatever timezone you want.
  15. CloudFlare is using a mechanism that is specifically designed to prevent people from doing the kinds of things you're trying to do. You're out of luck.
  16. https://jsfiddle.net/a9enhzp9/ Works for me. Have you checked the silly things, like not using the table-striped class, or other CSS overriding the striping?
  17. What's your HTML markup? Are you using a ?
  18. What are the various "content loop" numbers? Sounds like you basically just want a four-column layout, except using Bootstrap tables instead of actual tables. (Speaking of, are you sure you should not be using an actual table?) column = 1 loop { if column = 1 then output column start output cell column = column % 4 + 1 if column = 1 then output column end } // normally you would close out incomplete rows here // no need with bootstrap if column != 1 then output column end $column = 1; foreach (/* whatever */) { if ($column == 1) { echo "<div class='row'>"; } echo "<div class='col-sm-3'>"; // whatever echo "</div>"; $column = ($column % 4) + 1; if ($column == 1) { echo "</div>"; } } if ($column != 1) { echo "</div>"; }But maybe I didn't understand your question. Maybe you want to use two loops at once?
  19. How do you expect to get any rows before you've execute()d the query?
  20. prid and prflavour (and the other two) are protected, which means you can't change them in your code like you're trying to do. You need to use methods in the class. For example, 1. Use a getFlavour() method to get the flavor and check that it is "Mango" 2. Use updateQuantity() just like how you have there If your problem is finding out which object in the array is the Mango item then you need a loop like foreach ($_SESSION['cart'] as $prid => $item) { if ($item->getFlavour() == "Mango") { $item->updateQuantity(123); break; // don't need to check the rest of the cart } }What would be nicer than this is if you had a sort of ItemCollection that could do much of this work for you. One class representing an entire cart. Then that class could handle the searching part, and you could call it with code like $_SESSION['cart']->updateFlavourQuantity("Mango", 123);
  21. 1. Can't use header() if there has been any output. 2. The script cannot output anything except for what it does with readfile(). No HTML, no whitespace, nothing. <?php $exe = "Testing/Testprogram.exe"; header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"Testprogram.exe\""); header("Content-Length: " . filesize($exe)); readfile($exe); exit;That's all you need.
  22. That's why you don't do it by yourself but hire people who know how to do this kind of stuff. I'd be surprised if you can find somebody online, just some random person you find online, who actually knows what's going on with the systems and isn't subject to an NDA. Another approach is not doing the booking yourself but using a third-party system, like Expedia. You're much more likely to get something working that way than by actually negotiating with hotels yourself. Going that route makes things a lot easier, and as long as you obey whatever restrictions and terms of service come with the system you could do whatever you wanted.
×
×
  • 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.