E
E
evilless2016-06-22 05:39:29
PHP
evilless, 2016-06-22 05:39:29

How to make a calendar week in php + mysql?

Hello, please tell me where to start, it is
necessary to make sure that a person can sign up for a time and after approval by the administrator, the cell becomes inactive with time. And every day the calendar shifts 1 day forward . I understand that there are 2 stages here - building a
calendar week and writing the functionality of the admin panel .html

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
evilless, 2016-06-23
@evilless

This is how I solved the problem, thanks for the comment)
header('Content-Type: text/html; charset= utf-8');
$times = array(
"10.00 - 11.00",
"11.00 - 12.00",
"12.00 - 13.00",
"13.00 - 14.00",
"14.00 - 15.00"
);
$days = array(
'Sunday' , 'Monday' , 'Tuesday' , 'Wednesday' , 'Thursday' , 'Friday' , 'Saturday'
);
$num_day = (date('w'));
$num_month = (date('m'));
$num_year = (date('y'));
$day_count = 0;
$days_week = date("d")
?>
<
?php for($i = 0; $i <= 6 ; $i++) {
$name_day = $days[$num_day];
echo "".$name_day."";
$num_day ++ ;
}
?>
<?php
for($i = 0; $i <= 6 ; $i++) {
echo "".$days_week.".".$num_month.".".$num_year."";
foreach ($times as $time) {
echo "".$time."";
}
echo "";
$days_week++;
}
?>
Little things left

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question