E Online Support - Free Software Download
how to make calendar using php
Calendar using php
Naveen
Answer
1

Calendar using php
create the file cal.php:-

<?php error_reporting(0);?>
<script type='text/javascript' src='./jquery.js'></script>
<link href='./style.css' rel='stylesheet' type="text/css">
<script type='text/javascript'>
$(document).ready(function(){
  function showLoader(){
    $('.search-background').fadeIn(200);
  }
  function hideLoader(){
   $('.search-background').fadeOut(200);
  }
  
  $('#seldate').change(function(){
     var getYear = $('#seldate :selected').val();
     showLoader();
     $.get("./disp-cal.php","year="+getYear,function(result){
	hideLoader();
        $("#calendar").html(result);
     });
  });
  $("#calendar").load("./disp-cal.php");
});
</script>

<div class='search-background'><img src='./loader.gif'></div>
<div id='content' align=center>
	  <span style='margin-left: 250px;'>
      Select Date:<select id='seldate'>
		    <?php
		       for($i=2000;$i<=date('Y')-1;$i++){  
			   echo "<option>$i</option>";
		       }
		    ?>
        <option value="<?php echo date('Y');?>"><?php echo date('Y');?></option>
	  </select>
      </span>
</div>
<div id='calendar' align=center></div>


create the stylesheet file style.css

.topic{
    font-size: 13px; font-weight: bold;
    font-family: arial; text-align: center; text-decoration: underline;
}
.curdate{
    font-size: 12px; font-weight: bold;
    background-color: rgb(250,253,111);
    text-decoration: underline;
    font-family: arial; text-align: center;
}
.leavedays{
    background-color: lightblue;    
}
.monthnames{
    color: red; font-family: arial; text-align: center; font-size: 13px;
}
.daynames{
    font-size: 11px; font-weight: bold; background-color: #000000; color: #fff; font-family: arial;
}
.tab{
    border: 1px solid #888c8e;
    height: 150px;
}
.search-background {
	display: none;
	font-size: 13px;
	position: absolute;
	padding-top: 190px;
	padding-left: 450px;
	opacity:0.5;filter: alpha(opacity=50) ;
	text-decoration: none;
	text-shadow: #fff 0px 0px 20px;
}


Question*:
Description*:
Script:
Related To:
 PHP    HTML    CSS    JAVASCRIPT    JQUERY   
 AJAX    WINDOWS    GAMES    DRIVERS    MAC   
 LINUX    MOBILE    GADGETS   
Security Code:
2358
Enter Security Code:
 
Facebook   Linkedin   Skype   Twitter