Jump to content

oni-kun

Members
  • Posts

    1,984
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by oni-kun

  1. It's simple, although they don't even need to use paranthesis. Try this for example: function display($var) { return $var; } $variable = display('test'); $variable2 = (display('test')); echo "$variable <br/>$variable2"; //Both return 'test'
  2. if ( lp_tags('id_number') > 0 ) { echo '<link rel="stylesheet" type="text/css" media="screen" href="style1.css" />'; } else { echo '<link rel="stylesheet" type="text/css" href="style2.css" />'; } It's more preferable to use conditional blocks, As you'd be able to spot obvious errors easier and it is more clean.Your ELSE statement was wrong.
  3. These people probably never heard of the words: Game, High-End PC, Surround-Sound and Multiple Monitors Besides Pandora is not to last as such a happy place especially not 200 years after they find the Vault. Clue: "It's time to get, my pound of flesh" Strip the flesh, Salt the wound!
  4. You can always use an open source alternative such as Piwik: http://piwik.org/ It's similar to Google Analytics in many ways and is comparable in depth of features. EDIT: What do you mean not host? Most web analytics provide JS tags you can use.
  5. I wrote a GreaseMonkey script to filter out Expert Exchange from Google results.... I caught myself browsing those 'bogus' bug sections for an hour last night. They never get old.
  6. You should use the count function to check the amount of elements within the array (in this case the rows you're wanting to display). Here's an example: if (count($imagesResults2) > 5) { echo "More than 5 rows"; //Do Something } else { //Less than 5 rows }
  7. Why don't you create a CRON file to automatically pull out the database at a defined interval and place it into a folder that you wish? (could be inside or outside your public html folder). And as it'll maintain the structure of the database, it should keep your encodings correct. It's much easier than using a class or script to back it up.
  8. This can't be done, as if you were even to attempt to parse XML with a binary image within it'd come up with an obvious error as so. The only way you can do this is to link to the image within the xml file, for actionscript to read.
  9. I see what you are doing now. Why are you echoing an image into an xml file? The XML file should be text only, were you wanting to display the image name in place of the physical image itself?
  10. Then you'd have to include the $page variable before the included code. $page = 'aboutus'; include('aboutus.php'); echo $page; Aboutus.php is included, therefor the $page variable is passed into it.
  11. Why can't you define $page above that html except? It would be more syntatically correct and fix your problems.
  12. If you're wanting to get an answer, I'd recommend trimming your code to what is relative, and placing them withing tags. As well, this is a Javascript question, not PHP.
  13. Yes, if you want to provide the reasoning behind why you're wanting to echo a variable like this, there's other solutions, but if you're learning, you've learned.
  14. You cannot call a variable before it is defined, although you can use output buffering it is not recommended.
  15. Well yes, but you may as well just place: for ease. time()+($limit*60);
  16. I'm not sure what he's going on about, but he's not talking about HTML. An include file such as in PHP will be effected by that behaviour, but in HTML the browser would and should base the relative url based on the current viewed document. root/a/file.html root/b/file.html root/c/image.png You can either to access the image: A) Use an absoute path, 'root/c/image.png' or '/root/c/image.png' or B) Use a relative path, '../c/image.png' Either way, a trailing slash will be the same within HTML specification.
  17. This sets the time, and does not update it based on the current time. What if ~time is over ~limit? You're not checking if it's greater than.
  18. Are you putting session_start(); at the top of your page?
  19. You may as well just look at the HTML 4.0 specification. http://www.w3.org/TR/html401/intro/intro.html#h-2.1.3 RFC URL specification: http://www.ietf.org/rfc/rfc1738.txt
  20. You're critically missing the point of a relative/absolute path. Your question is invalid. Preceding slash or NOT it will display the same result and parse as the same path, this has behavior has been defined for, ~50 years? Are you sure that is your reproduction code? In *nix, paths are defined by the root (IE: "/" ) and HTML 2.0> provides the <base> element to overcome relative url paths. It should not default to root, it is not web browser behaviour.
  21. Damn...I am really am dumb as shit!!!! Thanks Guyz! No problem! Just part of programming. I'd recommend you download an IDE for PHP (such as NetBeans), They're free and can list PHP errors, as well as highlight your code to show obvious syntax errors.
  22. You should define the header: Content-type: image/png to display the image, refer to the image functions in the PHP manual on how to deal with them.
  23. You'd need AJAX to perform this. You can place the function within the onBlur() element with JS. As for your time, you can use strtotime('+15 days'). strtotime
×
×
  • 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.