/    Sign up×
Community /Pin to ProfileBookmark

Trying to Create a Calander

Hey all,

I have a calendar set up so that my client can input data and it will display it in the right hand side of the webpage. I then set up links so that if they click All Events it will display all events if they click Jan it will only display Jan events. Well now it has quit working and I am not sure what I did wrong help please.

[code=php]<?php
$contentVar = $_POST[‘contentVar’];
if ($contentVar == “AllDates”) {
include (‘Events_In_Order.php’);
} else if ($contentVar == “January”) {
include (‘January_Calendar.php’);
} else if ($contentVar == “Febuary”) {
include (‘February_Calendar.php’);
} else if ($contentVar == “March”) {
include(‘March_Calendar.php’);
}
else if ($contentVar == “April”) {
include(‘April_Calendar.php’);
}
else if ($contentVar == “May”) {
include(‘May_Calendar.php’);
}
else if ($contentVar == “June”) {
include(‘June_Calendar.php’);
}
else if ($contentVar == “July”) {
include(‘July_Calendar.php’);
}
else if ($contentVar == “August”) {
include(‘August_Calendar.php’);
}
else if ($contentVar == “September”) {
include(‘September_Calendar.php’);
}
else if ($contentVar == “October”) {
include(‘October_Calendar.php’);
}
else if ($contentVar == “November”) {
include(‘November_Calendar.php’);
}
else if ($contentVar == “December”) {
include (‘December_Calendar.php’);
}

?>[/code]

[code=php]<?php
// Run a select query to get my letest 6 items
// Connect to the MySQL database
include “conectionfo;e”;
$sql = mysql_query(“SELECT * FROM Calendar ORDER BY Date DESC”);
$calanderDisplay = “”;
$productCount = mysql_num_rows($sql); // count the output amount
if ($productCount > 0) {
while($row = mysql_fetch_array($sql)){
$id = $row[“id”];
$Header = $row[“Header”];
$Year = $row[“Year”];
$Month = $row[“Month”];
$Date = $row[“Date”];
$Time = $row[“Time”];
$Information = $row[“Information”];
$date_added = strftime(“%b %d, %Y”, strtotime($row[“date_added”]));
$calanderDisplay .= ‘
<div id=”ScheduleHeader”>’ . $Header . ‘</div>
<div id=”Dates”>’ . $Month . ‘, ‘ . $Date . ‘, ‘ . $Year . ‘</div>
<div id=”Time”>’ . $Time . ‘</div>
<div id=”Info”>’ . $Information . ‘</div>
‘;
}
} else {
$calanderDisplay = “We do not have any events scheduled for this month so far”;
}
mysql_close();
?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<style type=”text/css”>
@import url(“Style/Schedlue.css”);
</style>
<body></body>
<h1>Calendar</h1>
<p><a href=”all_date_events.php”>All Events</a></p>
<p><a href=”January_Calendar.php”>January</a></p>
<p><a href=”February_Calendar.php”>February</a></p>
<p><a href=”March_Calendar.php”>March</a></p>
<p><a href=”April_Calendar.php”>April</a></p>
<p><a href=”May_Calendar.php”>May</a></p>
<p><a href=”June_Calendar.php”>June</a></p>
<p><a href=”July_Calendar.php”>July</a></p>
<p><a href=”August_Calendar.php”>August</a></p>
<p><a href=”September_Calendar.php”>September</a></p>
<p><a href=”October_Calendar.php”>October</a></p>
<p><a href=”November_Calendar.php”>November</a></p>
<p><a href=”December_Calendar.php”>December</a></p>
<?php echo $calanderDisplay; ?>
</body>[/code]

Any and all suggestions are much appreciated. Thank you
Beth

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @shutterbug spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.22,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...