Jump to content

requinix

Administrators
  • Posts

    15,229
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. Displayed... when showing the form? Aren't they already in a ? Displayed when showing the submitted form? You haven't posted the code for that.
  2. If you want a read-only file, chmod 0444 for *nix and `attrib +r $file` on Windows.
  3. Generally. What site and what are you grabbing?
  4. You're not actually outputting a Word doc. That's the only way you could get a read-only restriction.
  5. Disabled inputs are not submitted with forms.
  6. Change your links to use the URLs you want. Do that manually. Won't happen automatically. Then you can RewriteEngine on RewriteRule ^/?(\d+)$ abc.php?id=$1 [L]in your .htaccess.
  7. Depends on the contents of $message, but I'm going to guess it's just HTML markup in which case the answer is probably no.
  8. getChildren() is required as part of the RecursiveIterator interface. If you're using a RecursiveIteratorIterator then you're not supposed to call it directly - that's handled behind the scenes. I don't see a flag to return only directories. Looks like you're on your own. But as you've seen it's only one additional line of code, and there isn't really any way it could happen more efficiently behind the scenes.
  9. There's also an extra ( there that would break the entire script.
  10. "SELECT COUNT * FROM reservation WHERE type='$type' AND start_time>=('$start_time') AND end_timeI believe last time I had to think about this the answer was "SELECT COUNT * FROM reservation WHERE type='$type' AND end_time>('$start_time') AND start_timeThat will not consider two reservations as overlapping if they start or stop on the same boundary (ie, one ends at the same time another begins). Use >= and
  11. Use return values just like you would any other function. private function sql() { return Upload::all(); } public function get_index() { dd($this->sql()); // ??? }
  12. Did you post the right part of code? I thought you said it was something to do with "businessname" and sending emails.
  13. Or just not output anything if $spec=="id".
  14. There's something funky with the setup. I'd pester them about this.
  15. Did you take a look at the error message in the $e exception?
  16. Looking at your code more I need to correct something: If you use literally what I posted then most of those else blocks will execute all the time. There should be two conditions going on: (1) they were answering the question and (2) they answered yes or no. You need to break the logic down one more step. if ($_SESSION['track'] == 2 && isset($_GET['answer1'])) { if ($_GET['answer1'] == 'Yes') { // Yes } else { // No } }(Still couldn't do it more easily with a switch.)
  17. A switch is merely shorthand for a series of if blocks, but you're essentially switching on true vs false and you've ended up with something even more complicated that the equivalent if blocks. Just go with the if. if ($_SESSION['track'] == 2 && isset($_GET['answer1']) && $_GET['answer1'] == 'Yes' /* <- that was the missing part */) { // "Yes" code } else { // "No" code }
  18. Without looking too hard, switch($_SESSION['track'] == 2 && isset($_GET['answer1'])) { case 'Yes':That won't work. You're switching on the result of a && expression. A boolean value. Not a string. Both "Yes" and "No" are ==true so the first case will always be executed.
  19. http://www.amazon.com/Vantec-CB-ISATAU2-Supports-2-5-Inch-5-25-Inch/dp/B000J01I1G/ref=sr_1_1?ie=UTF8&qid=1367268789&sr=8-1 That's the product he was linking to. This one doesn't have a referral tag. And isn't obfuscated. And doesn't try to add it to your cart immediately.
  20. If you're already loading it then you can reuse it with no additional memory usage (besides what's required to make the third image).
  21. It will take much more memory to load a 2500x2500 image into memory than a 450x400. Like, >30 times more.
  22. Because there's something wrong with it. Considering how you didn't give any kind of explanation behind what your code is supposed to do and what it actually does, I think that's a damn good answer.
  23. No, you can't put variables in CSS. Not without running the file as a PHP script. Are you rotating all the images by the same amount? Then I would put the CSS in a in the . But the code you posted has a different amount for each image, in which case I'd say to use inline CSS for each. Blasphemy, I know.
  24. So what's the question?
  25. It will be a different amount. The problem is you're trying to put variables inside a single-quoted string. That won't work. Either use double-quotes echo "";or something else entirely. CSS 3 is a very easy way to rotate an image but it requires browsers that support that. Many, perhaps most, do. That an option? Otherwise you'll have to rotate the image yourself (I mean with code, of course)...
×
×
  • 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.