Week 2 all all is well
Does anyone want to join my stats wall? All in real time.
Look at my stats link below and if you do, let me know. You can be added to my link or I can start one just for you and give you the URL so you can link yours.
Week 2 all all is well
Does anyone want to join my stats wall? All in real time.
Look at my stats link below and if you do, let me know. You can be added to my link or I can start one just for you and give you the URL so you can link yours.
Dear WHF
WELL DONE MATEY
img.photobucket.com/albums/...
Brill - now how are you going to celebrate????
Poppyfairyxx
Beer later.
Ok but is the prgramme written with constants?
I mean the months won't equate will they? because we have different length months!!!! and the 29 days soon run out of sync
I want someone to work on a formula that will give the variants of the months!!
Though It must be impossible because no ones done it
hehehe like your quotes of the visit
'Last night I lay in bed looking up at the stars in the sky and I thought to myself, "Where the heck is the ceiling?'
Other than that the site seems pretty west ham related!
You seem to suffer with gary numan as i do buffy the vampire slayer lol
WAY TO GO WEST HAM!!!!!!
Nosmoke4me.
Ta
Buffy,
I cleaned the site out and haven't had a chance to put anything back. The code is PHP driven and basically splits out the start and current time and then divides this up. It isn't 100% accurate, yet but I will work on it. I have got a hidden days longer I will live based on saving 11 minutes a ciggie but I am still messing with it.
The code has years and months that only show when these are greater than zero and if the number is one is has singular text and plural for more than one. If there are no days or weeks for example it does not show them. For example days are not showing at the moment but will re-appear tomorrow.
Buffy the smoke slayer more like
The singular and plural is cool most don't bother as with not showing text with a negative value!! very good x x
0 years 0 months is nonsensical and not too encouraging lollol
The exact lengths of months are impossible I guess :rolleyes:
Hehehe smoke slayer
The code so far is
<link rel="stylesheet" type="text/css" href="style.css">
$start = "2007-08-17 06:00:00";
$text = "have passed since I stopped smoking.";
//--------------------------
$now = strtotime ("now");
$then = strtotime ("$start");
$difference = $now - $then ;
$num = $difference/86400;
$num1 = $num/365;
$years = intval($num1);
$temp = $difference/86400 - $years*365;
$num2 = $temp/30;
$months = intval($num2);
$temp = $difference/86400 - ($years*365) - ($months*30);
$num3 = $temp/7;
$weeks = intval($num3);
$num3a = $difference/86400 - ($years*365) - ($months*30) - ($weeks*7);
$days = intval($num3a);
$num4 = ($difference/86400 - intval($difference/86400))*24;
$hours = intval($num4);
$num5 = ($num4 - $hours)*60;
$mins = intval($num5);
$num6 = ($num5 - $mins)*60;
$secs = intval($num6);
$saving = $days*5;
$saving = $difference/86400*5;
$saved = $difference/4320;
$differencea = $saved*11;
if ( $years > 1 ) {
echo $years ;
echo " Years, ";
} elseif ( $years == 1 ) {
echo $years ;
echo " Year, ";
} else {
echo " ";
}
if ( $months > 1 ) {
echo $months ;
echo " Months, ";
} elseif ( $months == 1 ) {
echo $months ;
echo " Month, ";
} else {
echo " ";
}
if ( $weeks > 1 ) {
echo $weeks ;
echo " Weeks, ";
} elseif ( $weeks == 1 ) {
echo $weeks ;
echo " Week, ";
} else {
echo " ";
}
if ( $days > 1 ) {
echo $days ;
echo " Days, ";
} elseif ( $days == 1 ) {
echo $days ;
echo " Day, ";
} else {
echo " ";
}
if ( $hours > 1 ) {
echo $hours ;
echo " Hours, ";
} elseif ( $hours == 1 ) {
echo $hours ;
echo " Hour, ";
} else {
echo " ";
}
if ( $mins > 1 ) {
echo $mins ;
echo " Minutes, ";
} elseif ( $mins == 1 ) {
echo $mins ;
echo " Minute, ";
} else {
echo " ";
}
if ( $secs > 1 ) {
echo $secs ;
echo " Seconds, ";
} elseif ( $secs == 1 ) {
echo $secs ;
echo " Second, ";
} else {
echo " ";
}
echo " ";
echo $text ;
?>
<br>
<?
echo "Based on £5 per packet I have saved £";
echo(floor($saving));
?>
<br>
<?
echo "Based on smoking 20 cigarettes per day I have saved myself from smoking ";
echo(floor($saved));
echo " cigarettes! ";
?>
Help yourself if you have a host with PHP
Very impressive
I have not but thanks x x
The post is here forever if people search it out in the future
I haven't used programming except basic html and dreamweaver type stuff
Since Basic!! :eek:
Last program i wrote was some funny quiz game thing for the zx spectrum
hehehehe