Jump to content

DarkWater

Members
  • Posts

    6,173
  • Joined

  • Last visited

    Never

Everything posted by DarkWater

  1. Wow, that's nice. Well done. I actually can't find anything wrong with it. It validates, it has nice colors and it's clean. The icon images are also quite nice.
  2. Umm, I hope you have quotation marks around the date/time in this: strtotime(2009-01-29 12:44:12) - time() You do, right?
  3. How is it stored in your database? What's the field's type and what does it say if you actually go and look directly in the database? P.S: Greek!
  4. Ctrl+S is usually the save hotkey.
  5. I'm fairly sure he means an actual flash player like Youtube would have.
  6. Ah, I found the problem. You have a space before and after the number in your form.
  7. @Prismatic: I can't really think of any valid reason to ever use a for loop like this in PHP for arrays. for($i = 0; $i < count($strings); $i++) { foreach would do it better: foreach($strings as $key=>$string) {
  8. You really should use a foreach loop for this. <?php $_GET['fix'] = array(1, 3); //test values $_GET['fixGetter'] = true; //test values $testArray = array(10,20,30,40); if($_GET['fixGetter']) { if (isset($_GET['fix'])) { foreach($_GET['fix'] as $val) { printf("GET: %d; \n Test: %d\n", $val, $testArray[$val]); } } } ?>
  9. Any errors? And by the way, you should use foreach loops instead of a for loop with count().
  10. I'd just send the whole part after the domain name as a GET variable to index.php and have it parse it out and do whatever with it, kind of like how most MVC frameworks handle it.
  11. Well, it's certainly sending the header. You can probably just include the default 303 page...
  12. The correct syntax is $_SESSION['item_icon']. You're using ( ). By doing that, you're making PHP think you're calling a function.
  13. I'm fairly sure that cookies can only hold 4KB of data, including the name. You can also have only 20 cookies per server/domain.
  14. We'd need to see exactly what kind of code you've got going. Although the memory leak is actually kind of surprising to me (PHP is usually pretty good about that), it could, as corbin said, be an extension that's buggy.
  15. If you're matching quotes, you might want to try something like: '/<base href=([\'"])(.+?)\1>/i' That way the quotes are matched.
  16. No. PHP can only access what was sent to it and I can tell you right now that the stuff you're looking for is not sent over HTTP.
  17. That means that you're calling mysql_fetch_assoc() or some other fetching functions at some point before the while loop.
  18. You can either change the PHP timezone to reflect your own, or get the date in Javascript and pass it into PHP. The former is probably going to be more elegant.
  19. Good luck with the things you plan on doing. You were pretty insightful on design and all of that stuff. And by the way, I completely see where you're coming from when you say that PHPFreaks isn't going in the direction that you're pushing it; the questions here are usually pretty basic and most of the one-time posters won't ever bother learning from some of your posts. I know I certainly did. Thanks a lot, and good luck.
  20. If you're going to be loading the whole file into memory anyway, you might as well shorten that up: <?php $filename = 'test.txt'; $data = file($filename); echo $data[6]; ?>
×
×
  • 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.