How can I pull events from MySQL to the events-data.js page? I can pull the events using PHP from MySQL, but I don't know how to get them into the events-data.js page in the proper format.
Thanks
1 reply · opened Sep 23, 2016
How can I pull events from MySQL to the events-data.js page? I can pull the events using PHP from MySQL, but I don't know how to get them into the events-data.js page in the proper format.
Thanks
Hello,
This is Definitely Possible. You will need to use a PHP File in order to achieve this. Your PHP Code will look something like this:
var canvasEvents = {
// For Loop for Events Result from Database
'' : '[]()',
}Make sure that you add this code in a PHP file with the .php Extension and then instead of using events-data.js in the Calendar JS Codes, use this PHP File.
This will definitely work fine. Let us know if we can help you with anything else or if you find any further issues.
Have the same question, or something new?
Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.
Reply on the dashboard