Location: PHPKode > scripts > PHP Voice > php-voice/samples/subdb_mod.php

 * Sample usage of the SubDialog class 
 * @author Mark Headd  <hide@address.com>
 * @changes rewritten for compatibilities with the new vxml module loader
 * $ version 1.0.0 Fri Nov 05 05:45:31 CET 2004 05:45:31 by hatem

// Name for subdialog
$name = "result";

// Location of subdialog form
$src = "subbie";

//Create parameter array
$params = array('fname'=>"Josh", 'lname'=>"Turner");

// Create grammar for subdialog (to keep this simple, use buitin date type
$grammar = "builtin:grammar/date";

// Create prompt for subdialog
$prompt = "Please state your date of birth ".$params['fname']." ".$params['lname'].".";

$page = new gonx_vxml;
$page->start_vxml("", "", "", "", "", "2.0");
$page->write("Hello, ".$params['fname']." ".$params['lname'].". This is a test to see how a subdialog works.");

$page->load("subdb::call",array($name, $src, $params));
//$page->subdb_call($name, $src, $params);

$page->write("The date of birth given was, ");


$page->load("subdb::form",array($src, $params, "Field1", $grammar, $prompt, "dob"));
//$page->subdb_form($src, $params, "Field1", $grammar, $prompt, "dob");


Return current item: PHP Voice