php – achor tag <a> is not clickable HTML-ThrowExceptions

Exception or error:

The anchor tag on the saturday of the first month is not working and I do not know why.
I am trying to figure out why saturday buttons for the first month displayed are not clickable.
All other days in both months are clickable.
My idea is that i want the dates to redirect to a different class that renders the classes for the clicked date.
this system is already live at , this is a really annoying bug that is blocking bookings for specific days in the month.

[![February Satruday is disabled ][2]][2]

//include ('../configs/DbConnect.php');
$dayofweek=date('w', strtotime($maindate));
$maindate1=date('Y-m-d', strtotime($maindate));
switch ($dayofweek){
    case 0:


function showMonth($month, $year)
    $date = mktime(12, 0, 0, $month, 1, $year);
    $daysInMonth = date("t", $date);
    // calculate the position of the first day in the calendar (sunday = 1st column, etc)
    $offset = date("w", $date);
    $rows = 1;

    echo "<h4>" . date("F Y", $date) . "</h4>\n";

    echo "<table class='table table-bordered' border=\"1\">\n";
    echo "\t<tr><th>Su</th><th>M</th><th>Tu</th><th>W</th><th>Th</th><th>F</th><th>Sa</th></tr>";
    echo "\n\t<tr>";

    for($i = 1; $i <= $offset; $i++)
        echo "<td style='font-size: small'></td>";

    for($day = 1; $day <= $daysInMonth; $day++)
        if( ($day + $offset - 1) % 7 == 0 && $day != 1)
            echo "</tr>\n\t<tr>";

        echo "<td> <a class='btn-outline-secondary' href='classes.php?day=$day-$month'>$day</a> </td>";

    while( ($day + $offset) <= $rows * 7)
        echo "<td></td>";

    echo "</tr>\n";
    echo "</table>\n";


//$db=new DbConnect();
//$classesquery = $db->querydb("SELECT as id, cp.product_name as classname,cp.description as details, as coachname,c.dayscheduled as day ,cp.class_requirement as class_requirements 
  //   ,(c.spotsvailable-c.spots_used ) as spots, c.timefrom as starttime , as location_name ,c.duration as classduration , c.datefrom as datefrom from tbl_classes c  join tbl_locations loc on 
    //join tbl_persons p on join tbl_products cp on = c.productid where c.is_active=0 and c.spots_used < c.spotsvailable and c.dayscheduled='$dayofweek' and c.dateto>= '$maindate1' 
//order by c.timefrom asc ");
<html lang="en">


    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>AER Portal</title>

    <!-- Bootstrap core CSS -->
    <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

    <!-- Custom styles for this template -->
    <link href="css/heroic-features.css" rel="stylesheet">



<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
    <div class="container">
        <a class="navbar-brand" href="index.php">Class Schedule</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        <div class="collapse navbar-collapse" id="navbarResponsive">
            <ul class="navbar-nav ml-auto">
                <li class="nav-item">
                    <a class="nav-link" href="">Home</a>

                <li class="nav-item active">
                    <a class="nav-link" href="#">Schedule
                        <span class="sr-only">(current)</span>
                <li class="nav-item">
                    <a class="nav-link" href="../login.php">Login</a>
                <!--li- class="nav-item">
                  <a class="nav-link" href="../register.php">Register</a>

<!-- Page Content -->
<div class="container">
    <div class="row">

        <div class="col-sm-3"   style="text-align: center">
            <div><?php showMonth($mon,$year)?> </div>


        <div class="col-sm-3"></div>
        <div class="col-sm-3"   style="text-align: center">
            <div><?php showMonth($mon+1,$year)?></div>


    <table class="table table-striped table-bordered table-list">

    <!-- /.container -->
<!-- Footer -->
<footer class="py-5 bg-dark">
    <div class="container">
        <p class="m-0 text-center text-white">Copyright &copy; AER Africa <?php echo date('Y')?></p>
    <!-- /.container -->

<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>


    .center {

    .modal-header {
        padding-bottom: 5px;

    .modal-footer {
        padding: 0;

    .modal-footer .btn-group button {
        border-top-left-radius : 0;
        border-top-right-radius : 0;
        border: none;
        border-right: 1px solid #ddd;

    .modal-footer .btn-group:last-child > button {
        border-right: 0;
    .main-parallax {
        z-index: 1;

How to solve:

You have a row that contains your calendars. There are three divs with the class col-sm-3. Try changing them all to col-sm-4. Bootstrap grids are based on 12 columns and you’re only using 9, which pushes everything too close together.

Leave a Reply

Your email address will not be published. Required fields are marked *