• Saturday , 18 November 2017

PHP MYSQL Event Calender Tutorial Part 1_1 : Basic Calender

Code Canyon



SUBSCRIBE if my tutorial help you… COMMENT if you got anything to say… RATE to see if you like the tutorial… Next Part …

Original source

3d Ocean

Related Posts

13 Comments

  1. กรรัก พร้อมจะบก
    November 10, 2017 at 13:16

    this tutorial save my life

    thank you very much

    https://github.com/iphpbb/eventcalendarbb/

  2. Alfred Garrett
    November 10, 2017 at 13:16

    very helpful!

  3. dinh nguyen
    November 10, 2017 at 13:16

    you can upload code.

  4. Daniel Zins
    November 10, 2017 at 13:16

    Show the calendar on what it looks like before going into the tutorial, so users can determine if that is what they want to use in the first place, just FYI

  5. Ronark Ren Rellevant
    November 10, 2017 at 13:16

    Thank you! Your Codes is Awesome!! 

  6. Ludovic Pelletier
    November 10, 2017 at 13:16

    Hello everybody,
    How can i do to begin the week with Monday ?

  7. ESOR STORMBORN
    November 10, 2017 at 13:16

     I follow your codes but its not working.

    <html>
    <head>
    <script>
    function goLastMonth(month, year){
    if (month == 1) {
    –year;
    month = 13;
    }
    document.location.href="<?php $_SERVER['PHP_SELF'];?>?month="+(month-1)+"$year="+year;

    }
    function goNextMonth(month, year){

    if (month == 12){
    ++year;
    month = 0;

    }
    document.location.href="<?php $_SERVER['PHP_SELF'];?>?month="+(month+1)+"$year="+year;

    }

    </script>

    </head>

    <body>

    <?php

    if(isset($_GET['day'])){
    $day = $_GET['day'];
    }else{
    $day=date("j");
    }

    if(isset($_GET['month'])){
    $month = $_GET['month'];
    }else{
    $month=date("n");
    }

    if(isset($_GET['year'])){
    $year = $_GET['year'];
    }else{
    $year=date("Y");
    }

    $day=date("j");
    $month = date("n");
    $year = date("Y");

    echo $day."/".$month."/".$year;

    $currentTimeStamp = strtotime("$year-$month-$day");
    $monthName = date("F", $currentTimeStamp) ;
    $numDays = date("t", $currentTimeStamp) ;
    $counter = 0;

    ?>

    <table border='1'>
    <tr>
    <td> <input style='width:50px;'   type='button' value='<' name='previousbutton' onclick="goLastMonth(<?php echo $month.",".$year?>)"> </td>
    <td colspan='5'><?php echo $monthName.", ".$year; ?></td>
    <td> <input style='width:50px;' type='button' value='>' name='nextbutton' onclick="goNextMonth(<?php echo $month.",".$year?>)"></td>

    </tr>

    <tr>
    <td width='50px'>Sun</td>
    <td width='50px'>Mon</td>
    <td width='50px'>Tue</td>
    <td width='50px'>Wed</td>
    <td width='50px'>Thu</td>
    <td width='50px'>Fri</td>
    <td width='50px'>Sat</td>
    </tr>
    <?php

    $day=date("j");
    $month = date("n");
    $year = date("Y");

    echo "<tr>";
    for($i = 1; $i < $numDays + 1; $i++, $counter++){
    $timeStamp = strtotime("$year-$month-$i");
    if($i == 1){

    $firstDay = date("w", $timeStamp);
    for($j = 0; $j < $firstDay; $j++, $counter++){
    echo"<td> &nbsp;</td>";

    //echo "<td align='center'>".$i."</td>";

    }

    }

    if($counter % 7 == 0){
    echo"</tr><tr>";
    }

        }

    echo "</tr>";

    ?>

    </table>

    </body>
    </html>

  8. jobin john
    November 10, 2017 at 13:16

    great

  9. Franz Fritx
    November 10, 2017 at 13:16

    thank you very much for your code, very useful

  10. Mido Besara
    November 10, 2017 at 13:16

    thanks @_@ 🙂

  11. chocolateloverloner
    November 10, 2017 at 13:16

    will this work if i only put it in a div or table so that it will be just a part of a webpage? im a newbie about this…thanks

  12. Daniel Queiroz
    November 10, 2017 at 13:16

    Thank you so much my friend… you saved my life!! 🙂

  13. GG
    November 10, 2017 at 13:16

    why no voice

Leave A Comment

You must be logged in to post a comment.