Page 1 of 1

question related for loop

Posted: Sat Aug 30, 2008 4:24 am
by rurazza
i wand to pick input from user for the duty roster
input is start date
end date
number of on days in a weak
shift
employee name
department
location
and want to save
example
start date is 1-08-2008 and end date is 15-08-2008
first caculate total days between these date
and
for($i=0;$i<totaldays;<i++)
first we insert the value for start date and then increment with 1 and end at the end day
differnce is 14 so we want to insert 14 entry
and i pink ondays from the user for one weak and compare it with is current day is equal to user input day the insert in ondays that day else null