Syntax Error

Following is part of a php page:

[php]// Create the banner
require_once $conf[‘file’] . ‘/lib/xmlrpc/php/BannerInfo.php’;
$oBanner = new OA_Dll_BannerInfo();
$oBanner->campaignId = $campaignId;
$oBanner->url = $_POST[‘banner_url’];
$oBanner->storageType = ‘web’;
$oBanner->aImage = array(
‘filename’ => $_FILES[‘banner’][‘name’],
‘content’ => file_get_contents($_FILES[‘banner’][‘tmp_name’])
);
$bannerId = $service->addBanner($oBanner);
if (is_int($bannerId)) {
$link = “http:// . {$conf[‘host’]}{$conf[‘www_path’]}/admin/banner-edit.php?”;
$link .= “clientid={$advertiserId}&campaignid={$campaignId}&bannerid={$bannerId}”
echo “Created banner [id{$bannerId}] - View it here”;
} else {
echo “Error creating banner :frowning: ({$banerId})”;
}[/php]

Unfortunately, when the page is invoked, IE generates the following error message:

Parse error: syntax error, unexpected T_ECHO in /home/.../self-serve page 1.php on line 74

Line 74, above, is:

[php]echo “Created banner [id{$bannerId}] - View it here”;[/php]

Since I’m not great, at php programming, could somebody please fix the error?

  • j

Fixed it and, boy, do I feel stupid!

When I tried inserting a ; at the end of the previous line, earlier, however, it didn’t work.

Of course, now it does.

Ouch! :-[

  • j
Sponsor our Newsletter | Privacy Policy | Terms of Service