dbldee Posted December 21, 2006 Share Posted December 21, 2006 My config://Database host:$db_host = 'localhost';//Database username:$db_user = 'cutyour_asurf6';//Database password:$db_pwd = '********';//Database name:$db_name = 'asurf6;//Site name for security checks:$self_name = 'localhost';//Root URL - http:// and do add a / at the end of the url:$self_url = 'http://www.ultratrafffichangout.com/';//Site URL to Index.php - Leave out http:// and do add a / at the end of the url:$siteurl = 'www.ultratrafffichangout.com/';//Default site to show when no valid user sites:$default_site = 'http://www.econsumershop.com;//Site Title will show up in email heading as well as on top// of main page:$title = 'the ultra hangout for website traffic';_______________________________________________-However the error:Parse error: syntax error, unexpected T_STRING in /home2/cutyour/public_html/ultratrafffichangout/vars.php on line 18.line 18 of vars.php is $self_name = 'localhost'What should $self_name bet set to or is something being over looked?thanks Link to comment https://forums.phpfreaks.com/topic/31491-parse-error/ Share on other sites More sharing options...
obsidian Posted December 21, 2006 Share Posted December 21, 2006 You're missing your closing quote on the line before:[code]$db_name = 'asurf6;[/code]It should be:[code]<?php$db_name = 'asurf6';?>[/code] Link to comment https://forums.phpfreaks.com/topic/31491-parse-error/#findComment-145874 Share on other sites More sharing options...
dbldee Posted December 21, 2006 Author Share Posted December 21, 2006 Not quite yet..... the complete vars.php is:<?php//===========Menu Settings===========////Database host:$db_host = 'localhost';//Database username:$db_user = 'cutyour_asurf6';//Database password:$db_pwd = '********';//Database name:<?php $db_name = 'asurf6;?>//Site name for security checks:$self_name = 'localhost';//Root URL - http:// and do add a / at the end of the url:$self_url = 'http://www.ultratrafffichangout.com/';//Site URL to Index.php - Leave out http:// and do add a / at the end of the url:$siteurl = 'www.ultratrafffichangout.com/';//Default site to show when no valid user sites:$default_site = 'http://www.econsumershop.com;//Site Title will show up in email heading as well as on top// of main page:$title = 'the ultra hangout for website traffic';//==========Site Settings============////Font Type$fontface = 'Verdana';//Admin Panel BG Color$admincolor = '#E1EBFB';//Button BG$adminbutton = '#E1EBFB';//Button BG$adminbutton2 = '#E1EBFB';//Members Area Cell BG 1$cellbg1 = '#eeeeee';//Members Area Link Rollover$links = '#c00000';//Members Area Cell Bg 2$cellbg2 = '#E1EBFB';//Email headers$email_headers = "bbbbbbbla bla bla.....?> Link to comment https://forums.phpfreaks.com/topic/31491-parse-error/#findComment-146020 Share on other sites More sharing options...
obsidian Posted December 21, 2006 Share Posted December 21, 2006 Check all your variable assignments. With a quick glance, there are two ($db_name and $default_site) that are missing closing quotation marks. Link to comment https://forums.phpfreaks.com/topic/31491-parse-error/#findComment-146022 Share on other sites More sharing options...
dbldee Posted December 22, 2006 Author Share Posted December 22, 2006 Thanks for the responseWe're making some progressSome warnings:Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home2/cutyour/public_html/ultratrafffichangout/headfoot.php on line 4Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home2/cutyour/public_html/ultratrafffichangout/index.php on line 13 Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home2/cutyour/public_html/ultratrafffichangout/headfoot.php on line 9Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home2/cutyour/public_html/ultratrafffichangout/headfoot.php on line 24Indexphp: <?phpsession_start();session_register("sess_name");session_register("sess_passwd");session_register("sess_data");include($DOCUMENT_ROOT . '/vars.php');include($DOCUMENT_ROOT . '/headfoot.php');include($DOCUMENT_ROOT . '/regmail.php');mysql_connect($db_host, $db_user, $db_pwd);mysql_select_db($db_name);uheader();[b][i]$res = mysql_query("select content from html where type='1page'");$content = mysql_result($res, 0, "content");[/i][/b]?>_________________________________________________________________headfootphp:<?function uheader() { $res = mysql_query("select content from html where type='head1'"); [b]$hf = mysql_result($res, 0, "content");[/b] echo($hf);}function ufooter() { $res = mysql_query("select content from html where type='foot1'"); $[b]hf = mysql_result($res, 0, "content");[/b] echo($hf);}function secheader() { $res = mysql_query("select content from html where type='head2'"); [b]$hf = mysql_result($res, 0, "content");[/b] echo($hf);}function secfooter() { $res = mysql_query("select content from html where type='foot2'"); [b]$hf = mysql_result($res, 0, "content");[/b] echo($hf);}}?> Link to comment https://forums.phpfreaks.com/topic/31491-parse-error/#findComment-146437 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.