[PHP] 2 dates, difference in days AARGH!!

2002-12-11 Thread Curtis Gordon
HI! I have two dates, one in the future, and the current date, I want to 
calculate the difference between the two in # of days. I have converted 
both dates to seconds:

future date:

current date:



Then I found the difference between the two:


Now I want to convert the difference to "days":

(24 [hours in a day] * 60 [minutes in an hour] * 60 [seconds in a 
minute] = 86400)

This seems to make sense to me, but I don't get the answer I want. As a 
test I start with a date 14 days in the future, so I should come out 
with an answer of 14, but it comes out as 3!

Please help this shoudln't be a big enough problem to throw me off schedule.

Curtis


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] 2 dates, difference in days AARGH!!

2002-12-11 Thread Curtis Gordon
I have made those changes, thank you (I even read the integers required 
thing but for some reason didn't register it).
Here is what I have now. Working with Dec 25, 2002 (a difference that 
should be 14 days).






difference in days: 

AND IT WORKS

Thank you Chris you have saved, my hairline, my marriage, and my sanity!


Chris Wesley wrote:

Oh, and $today['wday'] ... that's the day of the week.  I'm almost
positive you want the day of the month: $today['mday'].

   hth,
   ~Chris

On Wed, 11 Dec 2002, Chris Wesley wrote:

 

On Wed, 11 Dec 2002, Curtis Gordon wrote:

   

future date:

current date:


(0,0,0,$today['month'],$today['wday'],$today['year']);?>
 

$today['month'] is text, ie. "December", and mktime()  requires all
integer arguments.  If you use $today['mon'] instead, it seems like
you'll get what you want.
   




 


--
Your favorite stores, helpful shopping tools and great gift ideas. 
Experience the convenience of buying online with Shop@Netscape! 
http://shopnow.netscape.com/



Re: [PHP] export data to text file

2002-09-28 Thread Curtis Gordon

Why not write to a file on the server and generate a link to it?

Collect info > write file > user downloads file

Curtis

Diana Castillo wrote:

>okay, how can I write a file in csv format either to the browser or to the
>server? If I use the Mysqladmin page I get all the fields, I just want some
>of them.
>Diana
>
>--
>See my web page:
>http://www.netrox.net/%7Ecastillo/
>"Todd Pasley" <[EMAIL PROTECTED]> escribió en el mensaje
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>  
>
>>Hi
>>
>>If what you mean is... you want to be able to write to a file on the
>>browsers computer, then please let us know if you find a way.
>>
>>To my knowledge, there is not any intended way to do this... you wouldn't
>>want any old website to be able to manipulate your hard drive would you?
>>
>>It might be possible if you write an applet, otherwise, pretty much the
>>
>>
>only
>  
>
>>thing you should be able to write to the hard drive is a cookie.
>>
>>HTH
>>
>>Todd.
>>
>>
>>
>>>-Original Message-
>>>From: Diana Castillo [mailto:[EMAIL PROTECTED]]
>>>Sent: Sunday, 29 September 2002 12:03 AM
>>>To: [EMAIL PROTECTED]
>>>Subject: [PHP] export data to text file
>>>
>>>  
>>>
>> 8<---
>>
>>
>>
>
>
>
>  
>




Re: [PHP] Creating pop-up window and passing variable to it?

2002-06-04 Thread Curtis Gordon

This is how I do it. I fire a javascript when the link is clicked, which 
in turn submits a form targetting the page you openned (named of course).
function donewpage(){
open window named "mywindow"
submit form targetting "mywindow"
blah blah blah
}

sorry to be so brief but the hockey game is on.
w0ot!

Igor Portnoy wrote:

>How can I create a pop up window in my index.php (for example) when user
>clicks on the link and pass value of the variable from my index.php to
>this new window?
>
> 
>
> 
>
>
>  
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php