We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

missing ;

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
rov

missing ;

Post by rov »

Help!

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"/>
Nothing in the Plum documentation nor www.w3.org says anything about the need for a semicolon.
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());
This is the entire document.

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>

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Check call logs to help debug IVR issue

Post by support »

Hi,

You should try checking your IVR call logs for the last VXML file to help you debug this IVR issue.

Regards,
Plum Support

Post Reply