ramm Posted December 23, 2011 Share Posted December 23, 2011 Following is part of a php page: // 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 <a href='{$link}'>here</a>"; } else { echo "Error creating banner ({$banerId})"; } Unfortunately, when the page is invoked, IE generates the following error message: Quote Parse error: syntax error, unexpected T_ECHO in /home/.../self-serve page 1.php on line 74 Line 74, above, is: PHP Code: echo "Created banner [id{$bannerId}] - View it <a href='{$link}'>here</a>"; Since I'm not great, at php programming, could somebody please fix the error? - r Quote Link to comment https://forums.phpfreaks.com/topic/253769-syntax-error/ Share on other sites More sharing options...
SergeiSS Posted December 23, 2011 Share Posted December 23, 2011 You forget ';' at the end of previous line (I bet it's number is 73) Quote Link to comment https://forums.phpfreaks.com/topic/253769-syntax-error/#findComment-1300967 Share on other sites More sharing options...
Pikachu2000 Posted December 23, 2011 Share Posted December 23, 2011 When posting code, enclose it within the forum's . . . BBCode tags. Look at the line before the error. Notice anything missing from it? Maybe at the end? Quote Link to comment https://forums.phpfreaks.com/topic/253769-syntax-error/#findComment-1300968 Share on other sites More sharing options...
ramm Posted December 24, 2011 Author Share Posted December 24, 2011 I feel stupid! When I tried inserting a ; earlier, however, it didn't work. Of course, now it does. Thanks for the info! - r Quote Link to comment https://forums.phpfreaks.com/topic/253769-syntax-error/#findComment-1301001 Share on other sites More sharing options...
ManiacDan Posted December 24, 2011 Share Posted December 24, 2011 Also, IE isn't saying anything. One of the first things you need to realize is the difference between server-side errors (like this one) and client-side errors (javascript/css errors). Quote Link to comment https://forums.phpfreaks.com/topic/253769-syntax-error/#findComment-1301016 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.