Hello,
I am having issues creating a birthday countdown script. I have tried all sorts of things as you can see.
It seems that am only one step away from success but am missing something.
If i have done something completely stupid, please just point me in the right direction.
Sorry for the mess...
$x = $_POST["name"];
if (strstr($x,"-2")) {
echo "There are $x days until your birthday";}
else {
echo "Your date of birth is not in the correct format, please press backwards and try again.";}
$y = explode("-", $x);
$mydob = mktime(0,0,0,$y[1],$y[0],$y[2]);
print $mydob;
echo date("d/m/y", $mydob);
$today = time();
settype($mydob, 'integer');
settype($today, 'integer');
echo "<br>";
print $mydob - $today;
$remain = $mydob - $today;
echo "<br>";
print $mydob;
echo "<br>";
print $today;
echo "<br>";
print date($remain);
echo "<br>";
print $remain;
echo "<br>";
echo "There are..." . date("m/d/y g.i:s",$remain)