From afd67b015d3cd3d849169fb232a0fef54b622745 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Sun, 8 Apr 2001 07:33:09 +0000 Subject: [PATCH] Add strlen check to always stuff db with two digit $bday_day --- addressbook/add.php | 4 ++++ addressbook/edit.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/addressbook/add.php b/addressbook/add.php index 75e8a46ecd..d11fe01a14 100755 --- a/addressbook/add.php +++ b/addressbook/add.php @@ -72,6 +72,10 @@ if (! $bday_month && ! $bday_day && ! $bday_year) { $bday = ""; } else { + if (strlen ($bday_day) == 1) + { + $bday_day = "0".$bday_day; + } $bday = "$bday_month/$bday_day/$bday_year"; } diff --git a/addressbook/edit.php b/addressbook/edit.php index 378fe76103..2fca3e1108 100755 --- a/addressbook/edit.php +++ b/addressbook/edit.php @@ -78,6 +78,10 @@ if (! $bday_month && ! $bday_day && ! $bday_year) { $bday = ""; } else { + if (strlen ($bday_day) == 1) + { + $bday_day = "0".$bday_day; + } $bday = "$bday_month/$bday_day/$bday_year"; }