Jump to content

[SOLVED] Parse error


jstinehelfer

Recommended Posts

Help I am not a coder, been learning bits and pieces here.

 

I purchased a script from an online website to find error in the config.php file. I have installed other php scripts many times with plenty of success. I have emailed for support with no luck after a week. Me the sucker out some serious money now. But here it goes.

 

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/pcdeskt1/public_html/member/config.php on line 15

 

 

config.php file // I deleted db username password etc for security purposes.

 

<?php
$connect_string = 'localhost';
$connect_username = 'xxxxx_xxxx';
$connect_password = 'xxxxx';
$connect_db = 'xxxxxx_xxxxxx';

$link =mysql_connect($connect_string, $connect_username, $connect_password) or die("Connection Failed");
mysql_select_db($connect_db) or die("Database selection failure");

$gff = mysql_query("SELECT * FROM affiliate_settingspcor die(mysql_error());
$gffF = mysql_fetch_array($gff);

// site variables

$site_name = $gffF['site_name'];
$site_url = $gffF['site_url'];
$admin_email = $gffF['admin_email'];
$title =$gffF['title'];
$keywords =$gffF['keywords'];
$description = $gffF['description'];
$copyright = $gffF['copyright'];
$manual = $gffF['manual'];
//$currency = $gffF['currency'];

$symbol = $gffF['symbol'];


$usd_symbol='$';
$gbp_symbol='£';
$euro_symbol='&#8364;';

$today=date("Y-m-d");
$ip=$_SERVER['REMOTE_ADDR'];
?>

 

Its not liking the site variables for some reason.

 

Added code tags ~ CV

Link to comment
https://forums.phpfreaks.com/topic/135251-solved-parse-error/
Share on other sites

Please post any code in


tags so it's readable.  Also, it has a syntax highlighter so it makes spotting some errors very easy.

 

<?php
$connect_string = 'localhost';
$connect_username = 'xxxxx_xxxx';
$connect_password = 'xxxxx';
$connect_db = 'xxxxxx_xxxxxx';

$link =mysql_connect($connect_string, $connect_username, $connect_password) or die("Connection Failed");
mysql_select_db($connect_db) or die("Database selection failure");

$gff = mysql_query("SELECT * FROM affiliate_settingspcor die(mysql_error());
$gffF = mysql_fetch_array($gff);

// site variables

$site_name = $gffF['site_name'];
$site_url = $gffF['site_url'];
$admin_email = $gffF['admin_email'];
$title =$gffF['title'];
$keywords =$gffF['keywords'];
$description = $gffF['description'];
$copyright = $gffF['copyright'];
$manual = $gffF['manual'];
//$currency = $gffF['currency'];

$symbol = $gffF['symbol'];


$usd_symbol='$';
$gbp_symbol='£';
$euro_symbol='&#8364;';

$today=date("Y-m-d");
$ip=$_SERVER['REMOTE_ADDR'];
?>

 

EDIT: See?  That gigantic block of red is not good. =P  Try changing your code to:

<?php
$connect_string = 'localhost';
$connect_username = 'xxxxx_xxxx';
$connect_password = 'xxxxx';
$connect_db = 'xxxxxx_xxxxxx';

$link =mysql_connect($connect_string, $connect_username, $connect_password) or die("Connection Failed");
mysql_select_db($connect_db) or die("Database selection failure");

$gff = mysql_query("SELECT * FROM affiliate_settings") or die(mysql_error());
$gffF = mysql_fetch_array($gff);

// site variables

$site_name = $gffF['site_name'];
$site_url = $gffF['site_url'];
$admin_email = $gffF['admin_email'];
$title =$gffF['title'];
$keywords =$gffF['keywords'];
$description = $gffF['description'];
$copyright = $gffF['copyright'];
$manual = $gffF['manual'];
//$currency = $gffF['currency'];

$symbol = $gffF['symbol'];


$usd_symbol='$';
$gbp_symbol='£';
$euro_symbol='&#8364;';

$today=date("Y-m-d");
$ip=$_SERVER['REMOTE_ADDR'];
?>

Link to comment
https://forums.phpfreaks.com/topic/135251-solved-parse-error/#findComment-704469
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.