This is really minimal php script with classical options. No database! This is not ajax based script.
include_once(dirname(__FILE__) . "/mp.php"); $mp = new Mp(); $mp->createPoll(1, "What's your favorite character?", array( "Obe-one", "Master Yoda", "Darth Vader", "Darth Sidious", "Chewbacca", "Luke", "Laia" ) );
$mp->createPoll(2, "Poll with poll_id 2, right?", array( "yes.", "absolutely." ) );
/* setColor($poll_id, $foreground-color, $background-color) */ /* $foreground-color -> color of text. */ /* $background-color -> color of background. */ $mp->setColor(1, "#fda107", "#303030"); /* displayPoll function generates poll voting on page where you place this code. Poll won't be shown if user already voted. displayPoll param is poll_id [should match with creation poll_id] */ echo $mp->displayPoll(1); /* Shows poll results on page. * displayResult($poll_id, $count = false, $width = 220, $style = "default") */ /* $poll_id -> creation poll id */ /* $count -> show absolute numbers or percentage Check out EXAMPLES */ /* $width -> size of poll in displayResult */ /* "default" for future development */ echo $mp->displayResult(1, false, 220, "default");
First check out /data/ folder (is should be created by default, if there is on /data/ directory, create it manually.) Also check permissions of your /data/ directory. Set it to 644.
This is not ajax script, it's php-only. So this is by design.
Yes, check out install php poll script section.
In files, specificly in /data/ directory under $Poll_id check out 1, 2, 3, ... (number you gave specific poll)
Yes, but you'll have to hack mp.php file (Mp class) on your own. Check out displayResult function, you should find html code at the end.