PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Er. Rochak Chauhan   AJAX Poll   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example Script
Class: AJAX Poll
Process a poll without reloading the poll page
Author: By
Last change:
Date: 17 years ago
Size: 462 bytes
 

Contents

Class file image Download
<?PHP

define
('TEMPLATE_FILE', 'template.html');

// initalize
$pollHeader = "This is poll heading";
$question = "Which team will win World Cup Soccer 2006 ?";
$options = array("Brazil", "England", "France", "Germany");


require_once(
'AjaxPoll.inc.php');

$ajaxPoll = new AjaxPoll(TEMPLATE_FILE);

$ajaxPoll->tag('header', $pollHeader);
$ajaxPoll->tag('question', $question);
$ajaxPoll->tag('options', $options);

echo
$ajaxPoll->write();
?>