<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:series="http://unfoldingneurons.com/"
> <channel><title>Comments on: Add Events to the PHP&#160;Calendar</title> <atom:link href="http://davidwalsh.name/php-event-calendar/feed" rel="self" type="application/rss+xml" /><link>http://davidwalsh.name/php-event-calendar</link> <description>Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞.</description> <lastBuildDate>Wed, 23 May 2012 19:56:08 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>By: Daniel Rantala</title><link>http://davidwalsh.name/php-event-calendar#comment-32343</link> <dc:creator>Daniel Rantala</dc:creator> <pubDate>Wed, 23 May 2012 13:59:49 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4403#comment-32343</guid> <description>Hi David, and thanks for the awesome piece of code!Could someone  help me with a little something? I&#039;m certain that this is a piece of cake, but I&#039;m still new to PHP and I can&#039;t solve it myself.I&#039;d like to get two calendars on the page: this month, and the next one. So  currently it would be first May, then June and all the events added into the calendars.
I can make the two (for June,  I just add +1 to the $month defining, which is in my case the current one) calendars visible and working, but for the next month&#039;s calendar it doesn&#039;t display the events. So, how could I get it to work?Thank you very much in advance and best regard,
Daniel</description> <content:encoded><![CDATA[<p>Hi David, and thanks for the awesome piece of code!</p><p>Could someone  help me with a little something? I&#8217;m certain that this is a piece of cake, but I&#8217;m still new to PHP and I can&#8217;t solve it myself.</p><p>I&#8217;d like to get two calendars on the page: this month, and the next one. So  currently it would be first May, then June and all the events added into the calendars.<br
/> I can make the two (for June,  I just add +1 to the $month defining, which is in my case the current one) calendars visible and working, but for the next month&#8217;s calendar it doesn&#8217;t display the events. So, how could I get it to work?</p><p>Thank you very much in advance and best regard,<br
/> Daniel</p> ]]></content:encoded> </item> <item><title>By: Reece Young</title><link>http://davidwalsh.name/php-event-calendar#comment-31469</link> <dc:creator>Reece Young</dc:creator> <pubDate>Sat, 07 Apr 2012 13:21:34 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4403#comment-31469</guid> <description>Hi there! I have a calendar script: http://kirkcaldydistrictscouts.org.uk/events.phpI need help making an admin panel to add events! I have tried but if the event goes on for longer than a day, then the admin updating the calendar has to enter two rows. Is there a way for this not to happen?Thanks in advance!</description> <content:encoded><![CDATA[<p>Hi there! I have a calendar script: <a
href="http://kirkcaldydistrictscouts.org.uk/events.php" rel="nofollow">http://kirkcaldydistrictscouts.org.uk/events.php</a></p><p>I need help making an admin panel to add events! I have tried but if the event goes on for longer than a day, then the admin updating the calendar has to enter two rows. Is there a way for this not to happen?</p><p>Thanks in advance!</p> ]]></content:encoded> </item> <item><title>By: Mark Ramsey</title><link>http://davidwalsh.name/php-event-calendar#comment-31456</link> <dc:creator>Mark Ramsey</dc:creator> <pubDate>Thu, 05 Apr 2012 14:28:13 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4403#comment-31456</guid> <description>My calendar is creating an key value array but for some reason the event are not showing up in the calendar and help would be great to get my app working. thanks.&lt;code&gt;&lt;?php//connect to the database
$username=&quot;*******&quot;;
$password=&quot;*******&quot;;
$database=&quot;*********&quot;;$name=&quot;name&quot;;
$start_time=&quot;start_time&quot;;
$userid=&quot;userid&quot;;$connection = mysql_connect(&quot;localhost&quot;,$username,$password);
if (!$connection) {
die(&#039;Could not connect: &#039; . mysql_error());
}
//echo &#039;Connected successfully&#039;;mysql_select_db($database, $connection) or die( &quot;Unable to select database&quot;);//set the url for this page
$my_url = &quot;https://apps.facebook.com/mytown_connect/practice_cal.php&quot;;//require all the other php pages this page requires
require_once(&quot;mytown_auth.php&quot;);/* draws a calendar */
function draw_calendar($month,$year,$events){/* draw table */
$calendar = &#039;&#039;;/* table headings */
$headings = array(&#039;Sunday&#039;,&#039;Monday&#039;,&#039;Tuesday&#039;,&#039;Wednesday&#039;,&#039;Thursday&#039;,&#039;Friday&#039;,&#039;Saturday&#039;);
$calendar.= &#039;&#039;.implode(&#039;&#039;,$headings).&#039;&#039;;/* days and weeks vars now ... */
$running_day = date(&#039;w&#039;,mktime(0,0,0,$month,1,$year));
$days_in_month = date(&#039;t&#039;,mktime(0,0,0,$month,1,$year));
$days_in_this_week = 1;
$day_counter = 0;
$dates_array = array();/* row for week one */
$calendar.= &#039;&#039;;/* print &quot;blank&quot; days until the first of the current week */
for($x = 0; $x &lt; $running_day; $x++):
$calendar.= &#039;&#160;&#039;;
$days_in_this_week++;
endfor;/* keep going with days.... */
for($list_day = 1; $list_day &lt;= $days_in_month; $list_day++):
$calendar.= &#039;&#039;;
/* add in the day number */
$calendar.= &#039;&#039;.$list_day.&#039;&#039;;
$event_day = $year.&#039;-&#039;.$month.&#039;-&#039;.$list_day;
if(isset($events[$event_day])) {
foreach($events[$event_day] as $event) {
$calendar.= &#039;&#039;.$event[&#039;event_name&#039;].&#039;&#039;;
echo ($event[&#039;event_name&#039;]);
}
}
else {
$calendar.= str_repeat(&#039;&#160;&#039;,2);
}
$calendar.= &#039;&#039;;
if($running_day == 6):
$calendar.= &#039;&#039;;
if(($day_counter+1) != $days_in_month):
$calendar.= &#039;&#039;;
endif;
$running_day = -1;
$days_in_this_week = 0;
endif;
$days_in_this_week++; $running_day++; $day_counter++;
endfor;/* finish the rest of the days in the week */
if($days_in_this_week &lt; 8):
for($x = 1; $x &lt;= (8 - $days_in_this_week); $x++):
$calendar.= &#039;&nbsp;&#039;;
endfor;
endif;/* final row */
$calendar.= &#039;&#039;;/* end the table */
$calendar.= &#039;&#039;;/** DEBUG **/
$calendar = str_replace(&#039;&#039;,&#039;&#039;.&quot;\n&quot;,$calendar);
$calendar = str_replace(&#039;&#039;,&#039;&#039;.&quot;\n&quot;,$calendar);
/* all done, return result */
return $calendar;
}function random_number() {
srand(time());
return (rand() % 7);
}/* date settings */
//$month = (int) ($_GET[&#039;month&#039;] ? $_GET[&#039;month&#039;] : date(&#039;m&#039;));
//$year = (int)  ($_GET[&#039;year&#039;] ? $_GET[&#039;year&#039;] : date(&#039;Y&#039;));/* select month control */
$select_month_control = &#039;&#039;;
for($x = 1; $x &lt;= 12; $x++) {
$select_month_control.= &#039;&#039;.date(&#039;F&#039;,mktime(0,0,0,$x,1,$year)).&#039;&#039;;
}
$select_month_control.= &#039;&#039;;/* select year control */
$year_range = 7;
$select_year_control = &#039;&#039;;
for($x = ($year-floor($year_range/2)); $x &lt;= ($year+floor($year_range/2)); $x++) {
$select_year_control.= &#039;&#039;.$x.&#039;&#039;;
}
$select_year_control.= &#039;&#039;;/* &quot;next month&quot; control */
$next_month_link = &#039;&lt;a href=&quot;$year + 1).&#039;&quot; rel=&quot;nofollow&quot;&gt;Next Month &gt;&gt;&lt;/a&gt;&#039;;/* &quot;previous month&quot; control */
$previous_month_link = &#039;&lt;a href=&quot;$year - 1).&#039;&quot; rel=&quot;nofollow&quot;&gt;&lt;&lt; Previous Month&lt;/a&gt;&#039;;
?&gt;&lt;?php/* bringing the controls together */
$controls = &#039;&#160;&#160;&amp;nbsp&#039;.$select_month_control.$select_year_control.&#039;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#039;.$previous_month_link.&#039;&#160;&#160;&#160;&#160;&#160;&#039;.$next_month_link.&#039; &#039;;echo $controls;
?&gt;id;
//echo $fb_user_id;
$multi_queries = json_encode(array(&#039;query1&#039; =&gt; &#039;SELECT eid FROM event_member WHERE uid = me()&#039;, &#039;query2&#039; =&gt; &#039;SELECT eid,  name, start_time FROM event WHERE eid in (SELECT eid FROM #query1)&#039;, ));$results = $facebook-&gt;api(array(&#039;method&#039; =&gt; &#039;fql.multiquery&#039;, &#039;queries&#039; =&gt; $multi_queries));
//print_r ($results);foreach ($results[1][&#039;fql_result_set&#039;] as $values)
{
$fb_user_id = $user-&gt;id;
//echo $fb_user_id;
$start_date = date( &#039;Y-m-d&#039;, $values[&#039;start_time&#039;]);
$event_name = addslashes($values[&#039;name&#039;]);
//$event_name = ($values[&#039;name&#039;]);
$eid = ($values[&#039;eid&#039;]);
//echo &quot;start date of the event &quot; .$start_date .&quot; The events name &quot;. $event_name .&quot; the eid of the event &quot;.$eid.&quot;&quot;;
$mysql_query = &quot;SEE event_id&quot;;
$mysql_query=&quot;SELECT * FROM event_id WHERE event_id = $eid&quot;;
$result = mysql_query($mysql_query);
if(mysql_num_rows($result) == 0) {
if($fb_user_id != 0) {
$sql=&quot;INSERT INTO event_id (user_id, event_id, event_name, date_of_event)
VALUES
(&#039;$fb_user_id&#039;, &#039;$eid&#039;, &#039;$event_name&#039;, &#039;$start_date&#039;)&quot;;
echo $sql;
}
mysql_query($sql) or die(&quot;Error: &quot;.mysql_error());
}
//mysql_query($sql) or die(&quot;Error: &quot;.mysql_error());
}/* get all events for the given month */
$events = array();
if($month &lt; 10) $monthstr = &quot;0&quot;.$month; else $monthstr = &quot;&quot;.$month;
$query = &quot;SELECT  DATE_FORMAT(date_of_event,&#039;%Y-%m-%d&#039;) AS date_of_event , event_name FROM event_id WHERE date_of_event LIKE &#039;$year-%$monthstr-%&#039;&quot;;
//echo $query;
$result = mysql_query($query, $connection) or die(&#039;cannot get results!&#039;);
while($row = mysql_fetch_array($result)) {
$events[$row[&#039;date_of_event&#039;]][] = $row;
//echo ($events).&quot;&quot;;
}
while (list($key, $value) = each($events)) {
echo &quot;Key: $key; Value: $value\n&quot;;
}print_r ($events);
//echo &#039;&#039;.date(&#039;F&#039;,mktime(0,0,0,$month,1,$year)).&#039; &#039;.$year.&#039;&#039;;
//echo &#039;&#039;.$controls.&#039;&#039;;
echo &#039;&#039;;
echo draw_calendar($month,$year,$events);
echo &#039;&#039;;
?&gt;&lt;/code&gt;</description> <content:encoded><![CDATA[<p>My calendar is creating an key value array but for some reason the event are not showing up in the calendar and help would be great to get my app working. thanks.</p><p><code></p><p>&lt;?php</p><p> //connect to the database<br
/> $username=&quot;*******&quot;;<br
/> $password=&quot;*******&quot;;<br
/> $database=&quot;*********&quot;;</p><p>$name=&quot;name&quot;;<br
/> $start_time=&quot;start_time&quot;;<br
/> $userid=&quot;userid&quot;;</p><p>$connection = mysql_connect(&quot;localhost&quot;,$username,$password);<br
/> if (!$connection) {<br
/> die(&#039;Could not connect: &#039; . mysql_error());<br
/> }<br
/> //echo &#039;Connected successfully&#039;;</p><p>mysql_select_db($database, $connection) or die( &quot;Unable to select database&quot;);</p><p> //set the url for this page<br
/> $my_url = &quot;<a
href="https://apps.facebook.com/mytown_connect/practice_cal.php&#038;quot" rel="nofollow">https://apps.facebook.com/mytown_connect/practice_cal.php&#038;quot</a>;;</p><p>//require all the other php pages this page requires<br
/> require_once(&quot;mytown_auth.php&quot;);</p><p>/* draws a calendar */<br
/> function draw_calendar($month,$year,$events){</p><p> /* draw table */<br
/> $calendar = &#039;';</p><p> /* table headings */<br
/> $headings = array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');<br
/> $calendar.= ''.implode('',$headings).'';</p><p> /* days and weeks vars now ... */<br
/> $running_day = date('w',mktime(0,0,0,$month,1,$year));<br
/> $days_in_month = date('t',mktime(0,0,0,$month,1,$year));<br
/> $days_in_this_week = 1;<br
/> $day_counter = 0;<br
/> $dates_array = array();</p><p> /* row for week one */<br
/> $calendar.= '';</p><p> /* print "blank" days until the first of the current week */<br
/> for($x = 0; $x &lt; $running_day; $x++):<br
/> $calendar.= &#039;&nbsp;';<br
/> $days_in_this_week++;<br
/> endfor;</p><p> /* keep going with days.... */<br
/> for($list_day = 1; $list_day &lt;= $days_in_month; $list_day++):<br
/> $calendar.= &#039;';<br
/> /* add in the day number */<br
/> $calendar.= ''.$list_day.'';</p><p> $event_day = $year.'-'.$month.'-'.$list_day;<br
/> if(isset($events[$event_day])) {<br
/> foreach($events[$event_day] as $event) {<br
/> $calendar.= ''.$event['event_name'].'';<br
/> echo ($event['event_name']);<br
/> }<br
/> }<br
/> else {<br
/> $calendar.= str_repeat('&nbsp;',2);<br
/> }<br
/> $calendar.= '';<br
/> if($running_day == 6):<br
/> $calendar.= '';<br
/> if(($day_counter+1) != $days_in_month):<br
/> $calendar.= '';<br
/> endif;<br
/> $running_day = -1;<br
/> $days_in_this_week = 0;<br
/> endif;<br
/> $days_in_this_week++; $running_day++; $day_counter++;<br
/> endfor;</p><p> /* finish the rest of the days in the week */<br
/> if($days_in_this_week &lt; 8):<br
/> for($x = 1; $x &lt;= (8 - $days_in_this_week); $x++):<br
/> $calendar.= &#039;&amp;nbsp;';<br
/> endfor;<br
/> endif;</p><p> /* final row */<br
/> $calendar.= '';</p><p> /* end the table */<br
/> $calendar.= '';</p><p> /** DEBUG **/<br
/> $calendar = str_replace('',''."\n",$calendar);<br
/> $calendar = str_replace('',''."\n",$calendar);</p><p> /* all done, return result */<br
/> return $calendar;<br
/> }</p><p>function random_number() {<br
/> srand(time());<br
/> return (rand() % 7);<br
/> }</p><p>/* date settings */<br
/> //$month = (int) ($_GET['month'] ? $_GET['month'] : date('m'));<br
/> //$year = (int)  ($_GET['year'] ? $_GET['year'] : date('Y'));</p><p>/* select month control */<br
/> $select_month_control = '';<br
/> for($x = 1; $x &lt;= 12; $x++) {<br
/> $select_month_control.= &#039;'.date('F',mktime(0,0,0,$x,1,$year)).'';<br
/> }<br
/> $select_month_control.= '';</p><p>/* select year control */<br
/> $year_range = 7;<br
/> $select_year_control = '';<br
/> for($x = ($year-floor($year_range/2)); $x &lt;= ($year+floor($year_range/2)); $x++) {<br
/> $select_year_control.= &#039;'.$x.'';<br
/> }<br
/> $select_year_control.= '';</p><p>/* "next month" control */<br
/> $next_month_link = '<a
href="$year + 1).'" rel="nofollow">Next Month &gt;&gt;</a>';</p><p>/* "previous month" control */<br
/> $previous_month_link = '<a
href="$year - 1).'" rel="nofollow">&lt;&lt; Previous Month</a>';<br
/> ?&gt;</p><p>&lt;?php</p><p>/* bringing the controls together */<br
/> $controls = &#039;&nbsp;&nbsp;&amp;nbsp'.$select_month_control.$select_year_control.'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.$previous_month_link.'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.$next_month_link.' ';</p><p>echo $controls;<br
/> ?&gt;</p><p>id;<br
/> //echo $fb_user_id;<br
/> $multi_queries = json_encode(array('query1' =&gt; 'SELECT eid FROM event_member WHERE uid = me()', 'query2' =&gt; 'SELECT eid,  name, start_time FROM event WHERE eid in (SELECT eid FROM #query1)', ));</p><p>$results = $facebook-&gt;api(array('method' =&gt; 'fql.multiquery', 'queries' =&gt; $multi_queries));<br
/> //print_r ($results);</p><p>foreach ($results[1]['fql_result_set'] as $values)<br
/> {<br
/> $fb_user_id = $user-&gt;id;<br
/> //echo $fb_user_id;<br
/> $start_date = date( 'Y-m-d', $values['start_time']);<br
/> $event_name = addslashes($values['name']);<br
/> //$event_name = ($values['name']);<br
/> $eid = ($values['eid']);<br
/> //echo "start date of the event " .$start_date ." The events name ". $event_name ." the eid of the event ".$eid."";<br
/> $mysql_query = "SEE event_id";<br
/> $mysql_query="SELECT * FROM event_id WHERE event_id = $eid";<br
/> $result = mysql_query($mysql_query);<br
/> if(mysql_num_rows($result) == 0) {<br
/> if($fb_user_id != 0) {<br
/> $sql="INSERT INTO event_id (user_id, event_id, event_name, date_of_event)<br
/> VALUES<br
/> ('$fb_user_id', '$eid', '$event_name', '$start_date')";<br
/> echo $sql;<br
/> }<br
/> mysql_query($sql) or die("Error: ".mysql_error());<br
/> }<br
/> //mysql_query($sql) or die("Error: ".mysql_error());<br
/> }</p><p>/* get all events for the given month */<br
/> $events = array();<br
/> if($month &lt; 10) $monthstr = &quot;0&quot;.$month; else $monthstr = &quot;&quot;.$month;<br
/> $query = &quot;SELECT  DATE_FORMAT(date_of_event,&#039;%Y-%m-%d&#039;) AS date_of_event , event_name FROM event_id WHERE date_of_event LIKE &#039;$year-%$monthstr-%&#039;&quot;;<br
/> //echo $query;<br
/> $result = mysql_query($query, $connection) or die(&#039;cannot get results!&#039;);<br
/> while($row = mysql_fetch_array($result)) {<br
/> $events[$row[&#039;date_of_event&#039;]][] = $row;<br
/> //echo ($events).&quot;";<br
/> }<br
/> while (list($key, $value) = each($events)) {<br
/> echo "Key: $key; Value: $value\n";<br
/> }</p><p>print_r ($events);<br
/> //echo ''.date('F',mktime(0,0,0,$month,1,$year)).' '.$year.'';<br
/> //echo ''.$controls.'';<br
/> echo '';<br
/> echo draw_calendar($month,$year,$events);<br
/> echo '';<br
/> ?&gt;</p><p></code></p> ]]></content:encoded> </item> <item><title>By: E.R.</title><link>http://davidwalsh.name/php-event-calendar#comment-31447</link> <dc:creator>E.R.</dc:creator> <pubDate>Thu, 05 Apr 2012 03:26:24 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4403#comment-31447</guid> <description>Thanks a million, this is a great resource!
If anyone wants a quick way to turn the month number into the month name:
&lt;code&gt;$monthName = date(&quot;F&quot;, mktime(0, 0, 0, $month, 10));&lt;/code&gt;</description> <content:encoded><![CDATA[<p>Thanks a million, this is a great resource!<br
/> If anyone wants a quick way to turn the month number into the month name:<br
/> <code>$monthName = date("F", mktime(0, 0, 0, $month, 10));</code></p> ]]></content:encoded> </item> <item><title>By: Silver</title><link>http://davidwalsh.name/php-event-calendar#comment-31164</link> <dc:creator>Silver</dc:creator> <pubDate>Wed, 21 Mar 2012 12:32:29 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4403#comment-31164</guid> <description>Hey John. Thanks for that code. Was wondering what tables you created to make it work and if you ever managed to make it look prettier?</description> <content:encoded><![CDATA[<p>Hey John. Thanks for that code. Was wondering what tables you created to make it work and if you ever managed to make it look prettier?</p> ]]></content:encoded> </item> <item><title>By: John</title><link>http://davidwalsh.name/php-event-calendar#comment-31129</link> <dc:creator>John</dc:creator> <pubDate>Tue, 20 Mar 2012 01:38:55 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4403#comment-31129</guid> <description>Where to begin...
I&#039;ve spent several hours off and on playing with this calendar idea over the last several months. There are so many errors in the code that it has taken weeks for me to sort through it all. Yes I&#039;m a newbie, so I&#039;m not as clear about what I&#039;m doing, that said there are giant holes in what was originally put here.I rewrote parts of it, and added some of the suggestions that are in the above comments, and after spending about 6 hours today I finally got data into a working calendar with the code found here
http://www.codesend.com/view/84dba4acad5998d6fd4119c0c758dc52/Now I just have to make it look pretty and get my extra long titles to fit into the calendar spaces.John
March 2012</description> <content:encoded><![CDATA[<p>Where to begin&#8230;<br
/> I&#8217;ve spent several hours off and on playing with this calendar idea over the last several months. There are so many errors in the code that it has taken weeks for me to sort through it all. Yes I&#8217;m a newbie, so I&#8217;m not as clear about what I&#8217;m doing, that said there are giant holes in what was originally put here.</p><p>I rewrote parts of it, and added some of the suggestions that are in the above comments, and after spending about 6 hours today I finally got data into a working calendar with the code found here<br
/> <a
href="http://www.codesend.com/view/84dba4acad5998d6fd4119c0c758dc52/" rel="nofollow">http://www.codesend.com/view/84dba4acad5998d6fd4119c0c758dc52/</a></p><p>Now I just have to make it look pretty and get my extra long titles to fit into the calendar spaces.</p><p>John<br
/> March 2012</p> ]]></content:encoded> </item> <item><title>By: cnomann</title><link>http://davidwalsh.name/php-event-calendar#comment-30985</link> <dc:creator>cnomann</dc:creator> <pubDate>Mon, 12 Mar 2012 21:54:20 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4403#comment-30985</guid> <description>sorry code tag needed:&lt;code&gt;
$calendar.= &#039;&#039;.&#039;• &#039;.&#039;&lt;a&gt;&#039; .$event[&#039;event_name&#039;].&#039;&lt;/a&gt;&#039;;&lt;/code&gt;</description> <content:encoded><![CDATA[<p>sorry code tag needed:</p><p><code><br
/> $calendar.= ''.'• '.'<a>' .$event['event_name'].'</a>';</p><p></code></p> ]]></content:encoded> </item> <item><title>By: cnomann</title><link>http://davidwalsh.name/php-event-calendar#comment-30984</link> <dc:creator>cnomann</dc:creator> <pubDate>Mon, 12 Mar 2012 21:53:27 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4403#comment-30984</guid> <description>So, how would I add a link to an event listing in the calendar? I would like to be able to have the end user click on the link to pull up additional details associated with the event. Here is how I modified the code (approximately line 68):$calendar.= &#039;&#039;.&#039;&lt;a&gt;&#039; .$event[&#039;event_name&#039;].&#039;&lt;/a&gt;&#039;;The link works, but the id variable is not getting passed to the next page.Thanks,Connie</description> <content:encoded><![CDATA[<p>So, how would I add a link to an event listing in the calendar? I would like to be able to have the end user click on the link to pull up additional details associated with the event. Here is how I modified the code (approximately line 68):</p><p>$calendar.= &#8221;.&#8217;<a>&#8216; .$event['event_name'].&#8217;</a>&#8216;;</p><p>The link works, but the id variable is not getting passed to the next page.</p><p>Thanks,</p><p>Connie</p> ]]></content:encoded> </item> <item><title>By: GuyWhoFiguredItOut</title><link>http://davidwalsh.name/php-event-calendar#comment-30885</link> <dc:creator>GuyWhoFiguredItOut</dc:creator> <pubDate>Thu, 08 Mar 2012 10:43:02 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4403#comment-30885</guid> <description>The problem could also be in the query,In this query:
&quot;SELECT title, DATE_FORMAT(event_date,&#039;%Y-%m-%d&#039;) AS event_date FROM events WHERE event_date LIKE &#039;$year-$month%&#039;&quot;;If in the controls, you have chosen a month that has a single value (i.e. March = 3), the first thing that we think is that it comes out as &quot;03&quot; but instead if you echo it out, it goes like &quot;3&quot;. Which is why for months with individual number values (i.e. January, February, March, etc...) you should make sure that the month starts with zero.</description> <content:encoded><![CDATA[<p>The problem could also be in the query,</p><p>In this query:<br
/> &#8220;SELECT title, DATE_FORMAT(event_date,&#8217;%Y-%m-%d&#8217;) AS event_date FROM events WHERE event_date LIKE &#8216;$year-$month%&#8217;&#8221;;</p><p>If in the controls, you have chosen a month that has a single value (i.e. March = 3), the first thing that we think is that it comes out as &#8220;03&#8243; but instead if you echo it out, it goes like &#8220;3&#8243;. Which is why for months with individual number values (i.e. January, February, March, etc&#8230;) you should make sure that the month starts with zero.</p> ]]></content:encoded> </item> <item><title>By: Daniel</title><link>http://davidwalsh.name/php-event-calendar#comment-29207</link> <dc:creator>Daniel</dc:creator> <pubDate>Mon, 13 Feb 2012 16:42:13 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4403#comment-29207</guid> <description>@Don
the mysql query is to get the title, date of the events. this is a EVENT PHP CALENDAR.</description> <content:encoded><![CDATA[<p>@Don<br
/> the mysql query is to get the title, date of the events. this is a EVENT PHP CALENDAR.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 3/7 queries in 0.008 seconds using disk: basic
Object Caching 805/805 objects using disk: basic

Served from: davidwalsh.name @ 2012-05-23 16:18:24 -->
