
DarkWater
Members-
Posts
6,173 -
Joined
-
Last visited
Never
Everything posted by DarkWater
-
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.
-
[SOLVED] can anyone make this into a code ?
DarkWater replied to jamesxg1's topic in PHP Coding Help
I lol'd. -
Umm, I hope you have quotation marks around the date/time in this: strtotime(2009-01-29 12:44:12) - time() You do, right?
-
php and select return name of month instead of number
DarkWater replied to menwn's topic in PHP Coding Help
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! -
Ctrl+S is usually the save hotkey.
-
I'm fairly sure he means an actual flash player like Youtube would have.
-
Ah, I found the problem. You have a space before and after the number in your form.
-
@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) {
-
[SOLVED] very simple query problem! driving me insane!
DarkWater replied to unistake's topic in PHP Coding Help
It should be $cxn, not $cnx. -
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]); } } } ?>
-
Any errors? And by the way, you should use foreach loops instead of a for loop with count().
-
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.
-
Well, it's certainly sending the header. You can probably just include the default 303 page...
-
[SOLVED] Function Name Must Be a String error
DarkWater replied to scottt's topic in PHP Coding Help
The correct syntax is $_SESSION['item_icon']. You're using ( ). By doing that, you're making PHP think you're calling a function. -
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.
-
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.
-
I think that's going in my sig.
-
If you're matching quotes, you might want to try something like: '/<base href=([\'"])(.+?)\1>/i' That way the quotes are matched.
-
How to get local machine details with php
DarkWater replied to needs_upgrade's topic in PHP Coding Help
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. -
That means that you're calling mysql_fetch_assoc() or some other fetching functions at some point before the while loop.
-
[SOLVED] is date in server or in client?
DarkWater replied to homer.favenir's topic in PHP Coding Help
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. -
[SOLVED] is date in server or in client?
DarkWater replied to homer.favenir's topic in PHP Coding Help
The server. -
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.
-
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]; ?>