I try to $_post the value from a selected day in a calendar using checkbox and then insert into oracle db.
The problem I'm having is that when I try to insert into the database eg 1st january 2003 PHP only gives me 1103 instead of 010103. So PHP deletes the zero before the day and the month. When I choose a day with 2 digit day and month eg. 25th of December (251203) it works fine.
How can I make PHP not truncate my date?
this is my check box in the calendar code:
[code=php]
[code=php]
<input type='checkbox' name='cb".$sequence[$day]."'value =".$sequence[$day].$month.$year.">
and this is the way i get the values and insert into oracle:
[code=php]
[code=php]
for ($i=0; $i<=31;$i++) {
$date = $_POST['cb'.$i];
print $date;
$sql_day="insert into holiday_days values($hol_dayid_seq, $input, to_date('$date','DDMMYY'))";
Is there a way to tell PHP NOT to truncate?
thanks for your help