Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2006-06-26 02:40
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();
?>