PHP Classes

File: setEventTest.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil   HB PHP Events Calendar   setEventTest.php   Download  
File: setEventTest.php
Role: Example script
Content type: text/plain
Description: Example script
Class: HB PHP Events Calendar
Display HTML calendars with events from a database
Author: By
Last change:
Date: 7 years ago
Size: 510 bytes
 

Contents

Class file image Download
<?php

include 'src/calendarHTML.php';
include
'src/eventCalendar.php';
include
'src/eventsDBGateway.php';


$config = ['dbname'=>'event_calendar', 'dbhost' => 'localhost', 'dbuser' => 'root', 'dbpass' => '', 'dbtable' => 'events', 'assetsPath' => 'assets/', 'defaultDate' => date("Y-m-d")];

$events = new HBEventsCalendar\eventCalendar($config);

$event = [
   
"title" => "TestEvent 2",
   
"start" => "2016-12-05",
   
"url" => "http://phpclasses.org",
   
"end" => "2016-12-06",
    ];

echo(
$events->setEvent($event));