Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: PHP/MySQL problem

  1. #11
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by djr33 View Post
    Actually, I never use them. For all of the examples above, even something that complicated, I use the simple method from my last post. (HEREDOCs might be an exception, but I use them so rarely that's irrelevant.)
    This is mostly because I always use single quotes. It's a habit now, probably not actually that useful in every single case.
    And that's an interesting idea for SQL.
    The SQL example is over-simplified, of course, but that is one place I almost always use double-quotes. For the most part, I use single-quotes.

    I started using heredoc more frequently when I started getting closer to building whole CMS-like applications. I actually prefer it to using an output buffer for pushing content into a template (and I can, in most cases).

  2. #12
    Join Date
    Sep 2007
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    @JShor: I tried that, but it didn't give me any errors

    @Everyone above: I've been PHPing for about a year now, and never used curly brackets and have not ever had any problems. And the "updater" value is not an array, just a simple input. Nevertheless, I tried it and it made no difference.

    @Zak: Actually, you don't need to do that.

    Working on it at the time, and wow. I feel really stupid and unworthy of using a computer. I had been trying to find GET variables, when I had been passing data through POST. Wow. Wow. Wooooow. Sorry for the spam. At least we all learned a lesson about curly brackets.

  3. #13
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by connor4312 View Post
    ...the "updater" value is not an array, just a simple input.
    $_POST is the array in $_POST['updater']. Most people don't think of it that way, but it is.

    Quote Originally Posted by connor4312 View Post
    I had been trying to find GET variables, when I had been passing data through POST. Wow. Wow. Wooooow...
    it won't be the last time. I've been there. every few months, I get stuck trying to "fix" a custom function, only to realize (after two hours or so) that I'd simply forgotten to include the return statement.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •