Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello! So I am trying to make a calendar using php code and It doesnt seem to be working...here is my code: Assignment 2 Office

Hello! So I am trying to make a calendar using php code and It doesnt seem to be working...here is my code:

Assignment 2

include_once("header.inc");

readfile("menu.inc");

readfile("footer.inc");

?>

Office Hours Schedule


Student Name:

Email:



$CurMon = date('n');

$CurMonL = date('F');

$CurYear = date('Y');

$PDays = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');

$FDay = date("l", mktime(0,0,0,date("m"), 1));

if ($FDay == "Sunday"){

$Day1 = 1;

}

if ($FDay == "Monday"){

$Day1 = 1;

}

if ($FDay == "Tuesday"){

$Day1 = 1;

}

if ($FDay == "Wednesday"){

$Day1 = 1;

}

if ($FDay == "Thursday"){

$Day1 = 1;

}

if ($FDay == "Friday"){

$Day1 = 1;

}

if ($FDay == "Saturday"){

$Day1 = 1;

}

$MDays = date('t', mktime(0,0,0,$CurMon,1,$CurYear));

$CurDay = getdate();

echo "$CurMonL, $CurYear";

?>

Sunday

Monday

Tuesday

Wednesday

Thursday

Friday

Saturday


$PrintDay = 1;

for($row=1; $row<=6; $row++){

echo "

";

for($col=1; $col<=7; $col++){

echo "div id=\"rowdiv\">";

if ($row == 1){

while($CurDay<=$MDays){

if ($row < $Day1){

echo null;

}

else {

echo "

", $PrintDay, "
";

}

foreach($PDays as $value){

$_POST[monday];

}

foreach($PDays as $value){

$_POST[tuesday];

}

}

}

$col++;

}

$row++;

}

?>



Please help! Link to my site: http://helios.ite.gmu.edu/~bkell2/IT207/Calendar.php

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions