Author Topic: [PHP] Simple Countdown  (Read 5549 times)

0 Members and 1 Guest are viewing this topic.

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
[PHP] Simple Countdown
« on: September 11, 2005, 03:23:19 am »
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
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Ryan Marcus

  • Cross Platform.
  • Full Member
  • ***
  • Posts: 170
  • I'm Bono.
    • View Profile
    • My Blog
Re: [PHP] Simple Countdown
« Reply #1 on: September 11, 2005, 09:34:08 am »
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

Offline deadly7

  • 42
  • Moderator
  • Hero Member
  • *****
  • Posts: 6496
    • View Profile
Re: [PHP] Simple Countdown
« Reply #2 on: September 11, 2005, 12:36:59 pm »
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

Offline Blaze

  • x86
  • Hero Member
  • *****
  • Posts: 7136
  • Canadian
    • View Profile
    • Maide
Re: [PHP] Simple Countdown
« Reply #3 on: September 11, 2005, 01:06:50 pm »
Why not a java applet then?  Not quite JS. :P
And like a fool I believed myself, and thought I was somebody else...

Offline Sidoh

  • Moderator
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: [PHP] Simple Countdown
« Reply #4 on: September 11, 2005, 02:54:16 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

  • Guest
Re: [PHP] Simple Countdown
« Reply #5 on: September 11, 2005, 08:08:08 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? :)

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: [PHP] Simple Countdown
« Reply #6 on: September 12, 2005, 01:38:54 am »
k.
I'd personally do as Joe suggests

You might be right about that, Joe.