Drop Calendar Function - RMB Scripting
You appear not to have an account with us, Click HERE to register an account...
RMB Scripting
Navigation
  Home
  Contact
  FAQ
  Forum
  Topsites
  Members
  Affiliates
  Arcade <-- New!
  IoxHost
Downloads
  Templates
  Scripts
  Fonts
  Image Sets
  Software
  Other
 
Tutorials
  .htaccess
  Photoshop
  C/C++
  CSS
  Macromedia Flash
  MySQL
  PHP
  PHP - User System
  HTML
  Javascript
  Macintosh
  Macromedia Fireworks
  Visual Basic
  Visual C#
  Windows
  Python
  Other
 
Latest Tutorials
RMB User Commenting Sy...
Easy Navigation Integr...
Decorate Basic Icon
paragraph shortner
Convert Email address ...
Latest Comments
Badge System
Pet system
Pet system
Badge System
Report & Warn Script
Stats
Total Members: 597 [241]
Total Tutorials: 284
Newsest User: andrerds
Todays Unique Hits: 116
Users Online: 0
 
5 Guests
Poll
What do you look for in a web host?
Price
Uptime
Reviews
Customer Service
Size of Company
Main Content
Tutorial: Drop Calendar Function By whalleyboi09
Drop Calendar Function

This creates a an array of the months days and years and automatically creates an option box for each then you can call this function anywhere at anytime to have a quick simple calendar function without a whole lot of coding

if you need help theirs comments in the code

   
CODE:

<?php
# Calandar Function
# Whalleyboi09 (C) 2010
# Generates Simple Calendar Function to Make Things Alot Easier

function calendar_pullown() {
// Months Array
$months = array (1 => 'January','February','March','April','May','June','July','August','September','October','November','December');

// Generates Months Pull-Down Menu
echo '<select name="month">'; // Starts The Option Box
foreach ($months as $key => $value) {
echo "<option value=\"$key\">$value</option>\n";
}
echo '</select>'; // Ends the Options Box

// Generates Day Pull-Down Menu
echo '<select name="day">';
for ($day = 1; $day <= 31; $day++) {
echo "<option value=\"$day\">$day</option>\n";
}
echo '</select>';

// Genertaes Year Pull-Down Menu
echo '<select name="year">';
for ($year = 2005; $year <= 2015; $year++) {
echo "<option value=\"$year\">$year</option>\n";
}
echo '</select>';

// End Function
}

calendar_pullown();

?>


Comments // Questions Below
Request PM me

Difficulty: Moderate
Views: 130
Rating:
Comments
There are currently no comments for this tutorial.
Notice:
Remember to post long codes on our pastbin! - (http://rmb.pastebin.com/)
Add Comment
You must be logged in to post a comment.
Good Evening Guest
Username: 
Password: 
Remember Username
Links
RMB Arcade
$2.50 Resellers
Free Domains
Free Games
Affiliates