I'm getting the following error message:
missing ; before statement line 1
SyntaxError: missing ; before statement line 1
The problem has been isolated to the following lines of code,
but the structure is no different than the preceeding lines of code which do work:
Code: Select all
<var name="pet_name" expr=" '<? echo ($PetName_row[0]) ?>' " />
<assign name="application.PetName" expr="pet_name"/>
When I delete that code along with the following code, the document works with no problem at all.
Code: Select all
$PetName_query="SELECT pet_name FROM dbt WHERE type='".100."' ";
$PetName_result=mysql_query($PetName_query)or die(mysql_error());
$PetName_row=mysql_fetch_array($PetName_result)or die(mysql_error());
Code: Select all
<?php
$dbhost='dbh';
$dbusername='dbun';
$dbuserpass='dbpwd';
$dbname='dbn';
$dbTable='dbt';
$conn = mysql_connect($dbhost, $dbusername, $dbuserpass) or die('Error connecting to mysql'.mysql_error());
mysql_select_db($dbname);
$CallerName_query="SELECT caller_name FROM dbt WHERE type='".100."' ";
$CallerName_result=mysql_query($CallerName_query)or die(mysql_error());
$CallerName_row=mysql_fetch_array($CallerName_result)or die(mysql_error());
$OwnerName_query="SELECT owner_name FROM dbt WHERE type='".100."' ";
$OwnerName_result=mysql_query($OwnerName_query)or die(mysql_error());
$OwnerName_row=mysql_fetch_array($OwnerName_result)or die(mysql_error());
$PetName_query="SELECT pet_name FROM dbt WHERE type='".100."' ";
$PetName_result=mysql_query($PetName_query)or die(mysql_error());
$PetName_row=mysql_fetch_array($PetName_result)or die(mysql_error());
mysql_close($conn);
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0">
<form id="SetGlobalVariables">
<block>
<var name="caller_name" expr=" '<? echo ($CallerName_row[0]) ?>' " />
<assign name="application.CallerName" expr="program_name"/>
<var name="owner_name" expr=" '<? echo ($OwnerName_row[0]) ?>' " />
<assign name="application.OwnerName" expr="owner_name"/>
<var name="pet_name" expr=" '<? echo ($PetName_row[0]) ?>' " />
<assign name="application.PetName" expr="pet_name"/>
<goto next="Intro.vxml"/>
</block>
</form>
</vxml>