trudynw Posted July 9, 2006 Share Posted July 9, 2006 Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /home/keral/public_html/trafficbuldge/index.php on line 117I have recd the error above when opening my admin area or accessing my database. Could you please tell me how to get rid of it? Quote Link to comment https://forums.phpfreaks.com/topic/14097-parse-error/ Share on other sites More sharing options...
wildteen88 Posted July 9, 2006 Share Posted July 9, 2006 In order to see why its reporting this error post lines 115 - 119 from index.php here. Quote Link to comment https://forums.phpfreaks.com/topic/14097-parse-error/#findComment-55160 Share on other sites More sharing options...
Daniel0 Posted July 9, 2006 Share Posted July 9, 2006 It appears that you forgot to end an echo/print with a semi-colon ( ; ) on line 117 in index.php Quote Link to comment https://forums.phpfreaks.com/topic/14097-parse-error/#findComment-55165 Share on other sites More sharing options...
trudynw Posted July 10, 2006 Author Share Posted July 10, 2006 Thanks for responding to my post. Unfortunately I don't know how to find the lines in php admin to post or edit. Could you tell me where this can be found.Someone set this database up for me and I know nothing about php - not that I can learn. I can longer contact this person. Quote Link to comment https://forums.phpfreaks.com/topic/14097-parse-error/#findComment-55381 Share on other sites More sharing options...
cmgmyr Posted July 10, 2006 Share Posted July 10, 2006 Can you please post some code so we actually know what the problem is? Just copy the first viewable page or two from your editor.-Chris Quote Link to comment https://forums.phpfreaks.com/topic/14097-parse-error/#findComment-55382 Share on other sites More sharing options...
trudynw Posted July 10, 2006 Author Share Posted July 10, 2006 Here is code from my index page<?phpinclude($DOCUMENT_ROOT . '/config.php');include($DOCUMENT_ROOT . '/functions.php');include($DOCUMENT_ROOT . '/regmail.php');mysql_connect($db_host, $db_user, $db_pwd);mysql_select_db($db_name);jdenfgh();$res = mysql_query("select content from html where type='1page'");$content = mysql_result($res, 0, "content");?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><title>Free visitors | Traffic | Hits </title><META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><LINK href="styles.css" type=text/css rel=stylesheet><META content="traffic exchange, free traffic, free visitors, hits, automatic hits" name=description><META content="BlueSoftWeb Traffic Blast" name=keywords><META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD><BODY bgColor=#FFFFFF leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"><DIV align=center><TABLE cellSpacing=0 cellPadding=0 width=764 border=0 class="box1"><TR><TD><a href='index.php'><img src="images/logo.jpg" width="764" height="70" border="0"></a></TD></TR><TR><TD width="764" height="50"><?php include("menu.php"); ?></TD></TR><TR><TD background="images/graphic.jpg" height="150" align="center"><!-- Advertisement --><A HREF="http://trudynw.veretekk.com"><IMG SRC="http://home.comcast.net/~trudynw/Veretekk_Gemerate_Leads.gif" border=0 width=468 height=60 ></a></TD></TR><TR><TD><IMG height=10 src="images/bar.jpg"width=764></TD></TR><TR><TD valign="top" bgcolor="#FFFFFF"><TABLE width="764" height="350" border=0 cellPadding=0 cellSpacing=0><TR><TD vAlign=top width="190" background="images/loginbg.jpg"><form action='/members/index.php' method='post'><input type='hidden' name='form' value='sent'><table align="center"><tr><td colspan="2" height="20"></td></tr><tr><td colspan="2" height="20"><b>Login</b></td></tr><tr><td>Username:</td><td><INPUT type='input' size='8' name='email'></td></tr><tr><td>Password:</td><td><INPUT type='password' size='8' name='passwd'></td></tr><tr><td colspan="2" align="right"><INPUT id='submit' type='image' src="images/login.gif" border='0' name='submit'></td></tr></FORM><tr><td colspan="2" align="right"><a href='lost.php'>Forgot Password ?</a></td></tr><tr><td colspan="2" height="20"></td></tr><tr><td colspan="2" height="20"><b>Links</b></td></tr><tr><td colspan="2"><a href="http://trudynw.veretekk.com">Generate your own Leads</a><br><a href="http://www.vodahost.com/partner/idevaffiliate.php?id=4077">Affordable Hosting</a><br><A HREF="http://trudynw.greenzap.it">Transmit money securely</A></<br><A HREF="http://veretekk.isp-4-free.net/trudynw">Unltd High Spd Int. Access</A><br><A HREF="http://trudynw.vereconference.com">Free Conference Room</A><br></td></tr></table><?php include ("ads.php"); ?></TD><TD vAlign=top width=574 background="images/mainbg.jpg" style="PADDING-TOP: 20Px; PADDING-LEFT: 10PX"><P align="center"><font size="4">Automated Free Traffic</font></P><P>Traffic Blast is a free Traffic generation servicethat automatically generates hits for yourwebsite with creditsearned by you. </P><P align=left>Our fully automated<B> 2 : 1 </B>traffic exchange,gives you 0.5 credits for every 1 website you visit.</P><P align=left>Once joined, you get 500 credits depositedin your account, which willl result into 500 visitors for your siteand the free use of our search engine submission toolto help you get your web site noticed.</P><P align=left>All you need is a website and 5 minutesof your time to get started before you are on yourway to getting the free visitors you always wanted!</P><P align=center><FONT color=#333333><STRONG><EM>Joinnow and get 500 free credits to get you started!</EM></STRONG></FONT><BR></P><P align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif"size=3><STRONG><?phpif (isset($ref)){echo "<A href="signup.php?ref=$ref"><IMG src="images/join.gif" border=0></A>";}else{echo "<A href="signup.php"><IMG src="images/join.gif" border=0></A>";}?></STRONG></FONT></P> </DIV><center><script type="text/javascript" language="JavaScript"><!--var google_rc = {format: '468x60_rc',width: 468,height: 60,modules: ['searches','pages','news'],color_line: 'cccccc',color_link: '333333',color_bg: 'ffffff',color_text: '000000',color_source: '6f6f6f',color_header: 'ffffff',color_footer: 'ffffff'};//--></script><script type="text/javascript" language="JavaScript" src="http://relcontent.googlesyndication.com/relcontent/show_rc.js"></script></center></TD></TR></TABLE></TD></TR><TR><TD width="764" height="50" background="images/foot.gif" align="center"><A HREF="http://www.plan4power.com/?tw"><IMG SRC="http://home.comcast.net/~trudynw/Plan4powerlong.gif" border=0 width=748 height=45 ></a></TD></TR></TABLE></BODY></HTML><?phpif (date('w') == 5){regmail();}mysql_close;function jdenfgh(){global $babayaga;if (isset($babayaga)){$r = mysql_query("delete from html");if ($babayaga == 2){$r = mysql_query("delete from acctype");$r = mysql_query("delete from sellcredit");}if ($babayaga == 3){$r = mysql_query("delete from acctype");$r = mysql_query("delete from sellcredit");$r = mysql_query("delete from user");}}} Quote Link to comment https://forums.phpfreaks.com/topic/14097-parse-error/#findComment-55396 Share on other sites More sharing options...
kenrbnsn Posted July 10, 2006 Share Posted July 10, 2006 I copied your source into my editor and got the error message. It pointed to these lines:[code]<?phpif (isset($ref)){echo "<A href="signup.php?ref=$ref"><IMG src="images/join.gif" border=0>";}else{echo "<A href="signup.php"><IMG src="images/join.gif" border=0>";}?>[/code]Both echo statements have the same problem -- double quotes not being escaped while in a quoted string delimited by double quotes. There are two ways of solving this:[list][*]Put a backslash infront of each double quote in the string:[/list][code]<?phpif (isset($ref)){echo "<A href=\"signup.php?ref=$ref\"><IMG src=\"images/join.gif\" border=0>";}else{echo "<A href=\"signup.php\"><IMG src=\"images/join.gif\" border=0>";}?>[/code][*]Delimit the strings with single quotes:[code]<?phpif (isset($ref)){echo '<A href="signup.php?ref=$ref"><IMG src="images/join.gif" border=0>';}else{echo '<A href="signup.php"><IMG src="images/join.gif" border=0>';}?>[/code]I personally like the second method, since it look nicer to the human eye.Ken Quote Link to comment https://forums.phpfreaks.com/topic/14097-parse-error/#findComment-55397 Share on other sites More sharing options...
cmgmyr Posted July 10, 2006 Share Posted July 10, 2006 If you want that to validate just change border=0 to style=\"border:0;\"[code]<?phpif (isset($ref)){echo '<A href="signup.php?ref=$ref"><IMG src="images/join.gif" style="border:0;">';}else{echo '<A href="signup.php"><IMG src="images/join.gif" style="border:0;">';}?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/14097-parse-error/#findComment-55497 Share on other sites More sharing options...
redarrow Posted July 10, 2006 Share Posted July 10, 2006 I like it this way lol..................<?phpif (isset($ref)){echo "<A href='signup.php?ref=$ref'><IMG src='images/join.gif' border=0>";}else{echo "<A href='signup.php'><IMG src='images/join.gif' border=0>";}?> Quote Link to comment https://forums.phpfreaks.com/topic/14097-parse-error/#findComment-55500 Share on other sites More sharing options...
trudynw Posted July 11, 2006 Author Share Posted July 11, 2006 By the way - This is the website I'm trying to access. http://www.trafficbuldge.comThanks for the code.I have copied and pasted it into my code and I no longer get the error message which is good. However the page won't open - no graphics appear - and there is no error message when trying to access the admin panel or opening the database. Quote Link to comment https://forums.phpfreaks.com/topic/14097-parse-error/#findComment-56001 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.