Jump to content


  • Posts

  • Joined

  • Last visited


About DarkWater

  • Birthday 02/05/1993

Contact Methods

  • MSN

Profile Information

  • Gender
  • Location
    New York

DarkWater's Achievements


Member (2/5)



  1. [quote author=haku link=topic=110761.msg986087#msg986087 date=1220923163] YPHP has already been started. The XML starting tag doesn't matter, because PHP has already been started. But the ending tag of the XML declaration ends [i]PHP[/i] as well as XML. I don't know where you got this starting tag thing, I never mentioned anything about a starting tag, and no one else did either. However I have mentioned the closing tag a number of times. Whether short tags are on or off, if PHP has been entered, the closing tag of the XML declaration will close the PHP. [/quote] Wait, I don't even know how this topic got brought up...He wasn't using PHP for the XML tags in the original post.  Wth are we talking about?
  2. [quote author=haku link=topic=110761.msg986001#msg986001 date=1220915908] There is no such thing as a closing short tag. PHP closing tags and XML closing tags are identical. Turning off short tags will not solve the problem, the closing xml tag will still close the PHP and cause problems. Which is why the method he posted above solves the problem. [/quote] Turning off short tags means that the starting <? of the xml declaration won't start a PHP block.
  3. [quote author=haku link=topic=110761.msg985174#msg985174 date=1220837262] While you are right about not using short tags, he is right about what he said.  When echoing out an XML declaration in PHP, PHP thinks the closing xml tag is a closing php tag, and it screws everything up. As a result, escaping the brackets is necessary, though I prefer just to exit out of php altogether, output the xml declaration directly as text, then enter back into php if necessary. [/quote] That's why you turn short tags off. Then you don't have such problems.
  4. What?  First of all, NEVER use short tags.  Second of all, I have no idea what that would do for him.
  5. This was posted 4 years ago. Why was it bumped?
  6. Okay. And the reason is wasn't working before was because you have ' ' and not " ". =P It didn't evaluate the variable.
  7. Remove the $ from these: $_SESSION['$aInfo'] = "This is only a test"; $_SESSION['$bInfo'] = "Another Test"; $_SESSION['$cInfo'] = "Yet another"; And then do: $_SESSION["{$folder}Info"];
  8. POST is for when sending in forms. Trust me, you'll use sessions on this one. If you use POST or GET, it can be modified before sending it to the page with very little effort from someone who knows what they're doing.
  9. Photos and users are separate entities. They're related logically, because the user owns them, but not in structure when using them in OOP. On the other hand, the address can be directly related to the User.
  10. && is slightly higher priority I think....same thing. Just makes for nicer code usually since everyone understands it and looks for that rather than "and".
  11. You can, but you shouldn't...and if you're going to do that, why don't you just do: $_SESSION['somevar'] = "abcdefghijklmnopqrstuvwxyz"; ?
  12. No other way that can be accessed cross-domain securely.
  13. It's like any array. You don't NEED them, but you SHOULD HAVE them, because it's neater code, it's guaranteed to work later on, and it is faster. It works because PHP first looks for a constant named var because there are no quotation marks (which if it finds, you're screwed). If it doesn't find it, it assumes you wanted a string so it casts it for you. But you shouldn't rely on that. Use ' '.
  14. Yeah. You could just move them say, images/ and then do: printf('<img src="images/%s" />', $row['image_path']); Assuming $row['image_path'] is your image path (I didn't check).
  • 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.