I've got a hardcoded javascript calendar and I have to print the occasions from the database the industry PHP MySQL server side database. But I am unsure how you can fetch the queries from mysql and print it in to the javascript calendar :/ I discovered something which utilizes VBSCRIPT nevertheless its really perplexing :/

The overall outline:

Use PHP to gain access to the database and fetch rows of calendar data (utilizing a query). Then, print it to a Javascript data structure like JSON or native Javascript that's loaded in to the browser. Then, use the Javascript calendar code to load the information in to the see the browser presents towards the user around the web page.

There's lots of variation that may occur here, but roughly (in semi-psuedo code):

Within page consists of the calendar (results in JSON notation)

<script type="text/javascript">

$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');

$result = mysql_query('SELECT * FROM Events', $link);

$count = 0;

echo "var events = {";

while ($row = mysql_fetch_assoc($result)) {
    if ($count !== 0) echo ",";
    echo "{";
    echo "'eventid':'" . add_slashes($row['eventid']) . "',";
    echo "'title':'" . add_slashes($row['title']) . "',";
    echo "'description':'" . add_slashes($row['description']) . "',";
    echo "'date':'" . add_slashes($row['date']) . "',";
    echo "'time':'" . add_slashes($row['time']) . "'";
    echo "}";

echo "};";    


$calendar = new Calendar(events);


Obviously, you will find various ways that this may be done, but this is why it might flow. This really is only a good example shedding this code right into a PHP page on the server won't work, it's only designed to demonstrate how generally it might flow.