annetttteeee Posted October 26, 2015 Share Posted October 26, 2015 Hello! How can I pass my <select> input from one "form" to my calendar?// where do i put the $_post statement in my calendar code without messing with my dates? Im new at this but IM TRYINGG ATTACHED IS MY CODE! setUpForm.php calendar.php Quote Link to comment Share on other sites More sharing options...
Strider64 Posted October 27, 2015 Share Posted October 27, 2015 I use unorder lists and the anchor tag for the calendar I created: protected function currentMonth($date) { $this->isHoliday = new Holiday; /* Grab the current month DateTime */ $this->current = new DateTime($date); $this->days = $this->current->format('t'); // Days in the current month: /* Generate each day of the week's date */ for ($x = 1; $x <= $this->days; $x++) { if ($x < 10) { $this->urlDate = $this->current->format('Y') . '-' . $this->current->format('m') . '-0' . $x; } else { $this->urlDate = $this->current->format('Y') . '-' . $this->current->format('m') . '-' . $x; } $this->memo = $this->checkForEntry(); if ($this->isHoliday->checkForHoliday($this->urlDate)) { /* Grab the important date(s) of the month and put it into an array */ $this->highlightHoliday = 'highlightHoliday'; } else { $this->highlightHoliday = \NULL; } $this->sendDate = new DateTime($this->urlDate); /* Figure out if the month's day is today and highlight if it is */ if ($this->today->format('Y-m-d') === ($this->urlDate)) { $this->highlightToday = 'highlightToday'; } else { $this->highlightToday = \NULL; } /* The Actual Link of the day of the week for the current month */ $this->calendar[] = '<li class="calday ' . $this->highlightHoliday . ' ' . $this->memo . '"><a class="mark ' . $this->highlightToday . '" href="calendar.php?urlDate=' . htmlspecialchars($this->sendDate->format('Y-m-d')) . '&page=' . htmlspecialchars($_SESSION['page']) . '">' . $x . '</a></li>' . "\n"; } } I actually find it using the get statement for the statement and the post statement (using a form) for the booking portion of the calendar. See my signature for the website with my calendar on it (you'll have to be logged in (registered) to use the scheduling portion of the calendar). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.