Jump to content


Photo

Parse Error


  • Please log in to reply
9 replies to this topic

#1 trudynw

trudynw
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 09 July 2006 - 02:29 PM

Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /home/keral/public_html/trafficbuldge/index.php on line 117

I 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?

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 09 July 2006 - 02:30 PM

In order to see why its reporting this error post lines 115 - 119 from index.php here.

#3 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 09 July 2006 - 02:43 PM

It appears that you forgot to end an echo/print with a semi-colon ( ; ) on line 117 in index.php

#4 trudynw

trudynw
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 10 July 2006 - 02:47 AM

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.

#5 cmgmyr

cmgmyr
  • Members
  • PipPipPip
  • Advanced Member
  • 1,278 posts
  • LocationUSA

Posted 10 July 2006 - 02:54 AM

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

#6 trudynw

trudynw
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 10 July 2006 - 03:57 AM

Here is code from my index page

<?php
include($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.veret...etekk.com"><IMG SRC="http://home.comcast....rate_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.veret...k.com">Generate your own Leads</a><br>
<a href="http://www.vodahost....077">Affordable Hosting</a><br>
<A HREF="http://trudynw.green...ap.it">Transmit money securely</A></<br>
<A HREF="http://veretekk.isp-.../trudynw">Unltd High Spd Int. Access</A><br>
<A HREF="http://trudynw.verec...rence.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 service
that automatically generates hits for your
website with credits
earned 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 deposited
in your account, which willl result into 500 visitors for your site
and the free use of our search engine submission tool
to help you get your web site noticed.</P>
<P align=left>All you need is a website and 5 minutes
of your time to get started before you are on your
way to getting the free visitors you always wanted!</P>
<P align=center><FONT color=#333333><STRONG><EM>Join
now 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>

<?php
if (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.go...c.js"></script>
</center>


</TD>
</TR>
</TABLE>

</TD>
</TR>
<TR>
<TD width="764" height="50" background="images/foot.gif" align="center"><A HREF="http://www.plan4powe...r.com/?tw"><IMG SRC="http://home.comcast....4powerlong.gif" border=0 width=748 height=45 ></a>

</TD>
</TR>
</TABLE>
</BODY>
</HTML>
<?php


if (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");
}
}
}


#7 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 10 July 2006 - 04:26 AM

I copied your source into my editor and got the error message. It pointed to these lines:
<?php
if (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>";
}
?>
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:
  • Put a backslash infront of each double quote in the string:
<?php
if (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>";
}
?>
[*]Delimit the strings with single quotes:
<?php
if (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>';
}
?>

I personally like the second method, since it look nicer to the human eye.

Ken

#8 cmgmyr

cmgmyr
  • Members
  • PipPipPip
  • Advanced Member
  • 1,278 posts
  • LocationUSA

Posted 10 July 2006 - 12:29 PM

If you want that to validate just change border=0 to style=\"border:0;\"

<?php
if (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;">';
}
?>


#9 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 10 July 2006 - 12:34 PM

I like it this way lol..................

<?php
if (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>";
}
?>
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#10 trudynw

trudynw
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 11 July 2006 - 04:10 AM

By the way - This is the website I'm trying to access. http://www.trafficbuldge.com


Thanks 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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users