RE: [PHP] Simple Math Calculation Problem....

2003-08-01 Thread Buntin, Seth - KATE
I used your snip you just posted and changed the $Days = round(Days) to
$Days = round($Days) and got 228.

-Original Message-
From: Scott Fletcher [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 01, 2003 9:18 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Simple Math Calculation Problem


Hi!

I'm a little stuck with this simple math problem.  I'm trying to get
a number of days in integer, not float.

--snip--
   $input_date = 12/16/2002;
   $UserInput = explode(/, $input_date);

   $UserInputMonth = $UserInput[0];
   $UserInputDay = $UserInput[1];
   $UserInputYear = $UserInput[2];

   $clockDate = mktime(0,0,0,date(m),date(d),date(Y));
   $inputDate =
mktime(0,0,0,$UserInputMonth,$UserInputDay,$UserInputYear);

   $Days = (($clockDate - $inputDate) / (24 * 3600));
   //$Days = round(Days);
--snip--

But then I get the idea of doing the round function but it only
return a '0' value.  Anyone know?



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


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



[PHP] Using $PHP_SELF

2003-07-31 Thread Buntin, Seth - KATE
I am having problems while transfering information to another page.  I
am using $PHP_SELF and I am getting errors here is a bit of code so you
can see what I am saying:
 
echo a href='$PHP_SELF?file=$filedir=.$mydir.'$file/aBR\n;
 
This is what the browser is saying...
Notice: Undefined variable: PHP_SELF in
c:\inetpub\wwwroot\test\download.php on line 54
 
I don't know what to do.