News:

Facebook killed the radio star. And by radio star, I mean the premise of distributed forums around the internet. And that got got by Instagram/SnapChat. And that got got by TikTok. Where the fuck is the internet we once knew?

Main Menu

[PHP] Simple Countdown

Started by Joe, September 11, 2005, 03:23:19 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Joe

Teaches date() and number manipulation.

<?
  $EVENTMONTH = "9";
  $EVENTDAY   = "25";
 
  $NOWMONTH   = date("m");
  $NOWDAY     = date("d");
 
  $DIFFMONTH  = $EVENTMONTH - $NOWMONTH;
  $DIFFDAY    = $EVENTDAY   - $NOWDAY;
?>

<link rel="stylesheet" type="text/css" href="datatypes/stylesheet.css" />

<html>
  <head>
    <title>Joe's Birthday Countdown</title>
  </head>
  <body>
    <center>
      <h1>Joe's Birthday Countdown</h1>
      <? echo("$DIFFMONTH"); ?> months.<br />
      <? echo("$DIFFDAY"); ?> days.<br />
    </center>
  </body>
</html>


http://www.javaop.com/~joe/birthdaycountdown.php
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Ryan Marcus

Or you could do it in JavaScript and have live updating.  :o

Thanks, Ryan Marcus

Quote
<OG-Trust> I BET YOU GOT A CAR!
<OG-Trust> A JAPANESE CAR!
Quote
deadly: Big blue fatass to the rescue!
496620796F75722072656164696E6720746869732C20796F75722061206E6572642E00

deadly7

Don't let War let you hear saying that. ;) He finds JS to be the devil.
[17:42:21.609] <Ergot> Kutsuju you're girlfrieds pussy must be a 403 error for you
[17:42:25.585] <Ergot> FORBIDDEN

on IRC playing T&T++
<iago> He is unarmed
<Hitmen> he has no arms?!

on AIM with a drunk mythix:
(00:50:05) Mythix: Deadly
(00:50:11) Mythix: I'm going to fuck that red dot out of your head.
(00:50:15) Mythix: with my nine

Blaze

Why not a java applet then?  Not quite JS. :P
And like a fool I believed myself, and thought I was somebody else...

Sidoh

Quote from: deadly7 on September 11, 2005, 12:36:59 PM
Don't let War let you hear saying that. ;) He finds JS to be the devil.
Javascript is the devil.

And joe... I'm not even going to respond to that, K?  :)

trust

Quote from: Sidoh on September 11, 2005, 02:54:16 PM
Quote from: deadly7 on September 11, 2005, 12:36:59 PM
Don't let War let you hear saying that. ;) He finds JS to be the devil.
Javascript is the devil.

And joe... I'm not even going to respond to that, K?  :)

You just did, K? :)

Joe

Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.